Tests for data type aliases should be placed under spec/type_aliases
. For
example, the tests for the MyModule::Shape
type alias would be placed in
spec/type_aliases/mymodule_shape_spec.rb
.
The allow_value
matcher is used to test how the type alias behaves when given
a particular value.
Multiple values can be provided in a single test using the allow_values
matcher
You can negate the allow_value
matcher to test expected failure cases.