Sha256: ab081e36782e4f5a87eed4e15f3d3b698fb14da54c6ee10e40e4c89fda0a2e78

Contents?: true

Size: 673 Bytes

Versions: 4

Compression:

Stored size: 673 Bytes

Contents

# frozen_string_literal: true

require 'dry/logic/predicates'

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

    context 'when value is false' do
      let(:arguments_list) do
        [[false]]
      end

      it_behaves_like 'a passing predicate'
    end

    context 'when value is not false' do
      let(:arguments_list) do
        [
          [true],
          [''],
          [[]],
          [{}],
          [nil],
          [:symbol],
          [String],
          [1],
          [0],
          ['true'],
          ['false']
        ]
      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.5 spec/unit/predicates/false_spec.rb
dry-logic-1.0.4 spec/unit/predicates/false_spec.rb
dry-logic-1.0.3 spec/unit/predicates/false_spec.rb
dry-logic-1.0.2 spec/unit/predicates/false_spec.rb