Sha256: 96ddfae856ca813776c1002dd9ca0dc676c654440ac2ac9a60e31eabcd5227d9

Contents?: true

Size: 559 Bytes

Versions: 4

Compression:

Stored size: 559 Bytes

Contents

require 'dry/logic/predicates'

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

    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

4 entries across 4 versions & 1 rubygems

Version Path
dry-logic-1.0.0 spec/unit/predicates/none_spec.rb
dry-logic-0.6.1 spec/unit/predicates/none_spec.rb
dry-logic-0.6.0 spec/unit/predicates/none_spec.rb
dry-logic-0.5.0 spec/unit/predicates/none_spec.rb