Sha256: 08fc8b7de6b00879a35f7b72f6d8d1081304c2e1003758ab241816fba557b836

Contents?: true

Size: 542 Bytes

Versions: 9

Compression:

Stored size: 542 Bytes

Contents

require 'dry/logic/predicates'

RSpec.describe Dry::Logic::Predicates, '#is?' do
  let(:predicate_name) { :is? }
  let(:one) { Object.new }
  let(:two) { Object.new }

  context 'when value is equal to the arg' do
    let(:arguments_list) do
      [[one, one], [:one, :one]]
    end

    it_behaves_like 'a passing predicate'
  end

  context 'with value is not equal to the arg' do
    let(:arguments_list) do
      # Strings are not equal. Yet
      [[one, two], ['one', 'one']]
    end

    it_behaves_like 'a failing predicate'
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
dry-logic-1.0.5 spec/unit/predicates/includes_spec.rb
dry-logic-1.0.4 spec/unit/predicates/includes_spec.rb
dry-logic-1.0.3 spec/unit/predicates/includes_spec.rb
dry-logic-1.0.2 spec/unit/predicates/includes_spec.rb
dry-logic-1.0.0 spec/unit/predicates/includes_spec.rb
dry-logic-0.6.1 spec/unit/predicates/includes_spec.rb
dry-logic-0.6.0 spec/unit/predicates/includes_spec.rb
dry-logic-0.5.0 spec/unit/predicates/includes_spec.rb
dry-logic-0.4.2 spec/unit/predicates/includes_spec.rb