Sha256: 9a596c1e8fdb34c4aefbde8354a0af3e23a90efc04dfc47c576697d6941ba73a

Contents?: true

Size: 313 Bytes

Versions: 9

Compression:

Stored size: 313 Bytes

Contents

RSpec.describe Rule::Group do
  include_context 'predicates'

  subject(:rule) { Rule::Group.new([:pass, :pass_confirm], eql?) }

  describe '#call' do
    it 'calls predicate with result values' do
      expect(rule.('foo', 'foo')).to be_success
      expect(rule.('foo', 'bar')).to be_failure
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
dry-logic-0.1.4 spec/unit/rule/group_spec.rb
dry-logic-0.1.3 spec/unit/rule/group_spec.rb
dry-logic-0.1.2 spec/unit/rule/group_spec.rb
dry-logic-0.1.1 spec/unit/rule/group_spec.rb
dry-logic-0.1.0 spec/unit/rule/group_spec.rb
dry-validation-0.4.1 spec/unit/rule/group_spec.rb
dry-validation-0.4.0 spec/unit/rule/group_spec.rb
dry-validation-0.3.1 spec/unit/rule/group_spec.rb
dry-validation-0.3.0 spec/unit/rule/group_spec.rb