PropSchema.TestHarness (PropSchema v1.1.0) View Source
Reads the prop_schema information from the provided module. Then it constructs a series of prop tests according to provided field requirements and other considerations declared in the schema.
Once the tests are all constructed the tests will run through the normal mix test routine.
Link to this section Summary
Functions
Call in a test file to generate and execute property tests for the given
schema, [to_test: module] or [schema: module, changeset: {module, function}].
[additional_properties: module] is used to provide properties not yet
implemented in the base PropSchema.BaseProperties module.
Link to this section Types
Specs
Link to this section Functions
Specs
__using__(prop_test_args()) :: Macro.t()
Call in a test file to generate and execute property tests for the given
schema, [to_test: module] or [schema: module, changeset: {module, function}].
[additional_properties: module] is used to provide properties not yet
implemented in the base PropSchema.BaseProperties module.
Example
defmodule PropSchemaTest do
use PropSchema.TestHarness,
to_test: PropSchema.TestModule,
additional_properties: PropSchema.TestAdditionalProperties
end