Sha256: 8074dd8601c772bd3ce72fcad36a44e373593f15c3210db86541e89586d4add4

Contents?: true

Size: 561 Bytes

Versions: 13

Compression:

Stored size: 561 Bytes

Contents

require 'dry/logic/predicates'

RSpec.describe Dry::Logic::Predicates do
  describe '#none?' do
    let(:predicate_name) { :none? }

    context 'when value is nil' do
      let(:arguments_list) { [[nil]] }
      it_behaves_like 'a passing predicate'
    end

    context 'when value is not nil' do
      let(:arguments_list) do
        [
          [''],
          [true],
          [false],
          [0],
          [:symbol],
          [[]],
          [{}],
          [String]
        ]
      end
      it_behaves_like 'a failing predicate'
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
dry-logic-0.4.2 spec/unit/predicates/none_spec.rb
dry-logic-0.4.1 spec/unit/predicates/none_spec.rb
dry-logic-0.4.0 spec/unit/predicates/none_spec.rb
dry-logic-0.3.0 spec/unit/predicates/none_spec.rb
dry-logic-0.2.3 spec/unit/predicates/none_spec.rb
dry-logic-0.2.2 spec/unit/predicates/none_spec.rb
dry-logic-0.2.1 spec/unit/predicates/none_spec.rb
dry-logic-0.2.0 spec/unit/predicates/none_spec.rb
dry-logic-0.1.4 spec/unit/predicates/none_spec.rb
dry-logic-0.1.3 spec/unit/predicates/none_spec.rb
dry-logic-0.1.2 spec/unit/predicates/none_spec.rb
dry-logic-0.1.1 spec/unit/predicates/none_spec.rb
dry-logic-0.1.0 spec/unit/predicates/none_spec.rb