spec/integration/schema_spec.rb in dry-validation-0.9.5 vs spec/integration/schema_spec.rb in dry-validation-0.10.0

- old
+ new

@@ -160,6 +160,14 @@ phone_numbers: { 1 => ['must be a string'] } ) end end end + + context 'nested keys' do + it 'raises error when defining nested keys without `schema` block`' do + expect { + Dry::Validation.Schema { required(:foo).value { required(:bar).value(:str?) } } + }.to raise_error(ArgumentError, /required/) + end + end end