spec/unit/predicate_registry_spec.rb in dry-validation-0.9.5 vs spec/unit/predicate_registry_spec.rb in dry-validation-0.10.0

- old
+ new

@@ -10,11 +10,11 @@ schema_class.class_eval { def dis_ok?; true; end } end describe '.[]' do it 'returns a registry which collects predicate methods' do - expect(predicate_registry[:dis_ok?]).to be_instance_of(Dry::Logic::Predicate) + expect(predicate_registry[:dis_ok?]).to be_instance_of(UnboundMethod) end end describe '#[]' do it 'gives access to built-in predicates' do @@ -25,10 +25,10 @@ describe '#bind' do it 'binds unbound predicates and return finalized registry' do registry = predicate_registry.bind(schema) expect(registry).to be_frozen - expect(registry[:dis_ok?]).to be_instance_of(Dry::Logic::Predicate) + expect(registry[:dis_ok?]).to be_a(Method) expect(registry[:dis_ok?].()).to be(true) end end end