Sha256: e834cc397c1fd5fd5ce092cb05c6e39bf278073a6010d1005e1c05070bbcd091

Contents?: true

Size: 636 Bytes

Versions: 1

Compression:

Stored size: 636 Bytes

Contents

require 'dry/logic/predicates'

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

    context 'when value is a date' do
      let(:arguments_list) do
        [[true], [false]]
      end

      it_behaves_like 'a passing predicate'
    end

    context 'with value is not an integer' do
      let(:arguments_list) do
        [
          [''],
          [[]],
          [{}],
          [nil],
          [:symbol],
          [String],
          [1],
          [0],
          ['true'],
          ['false']
        ]
      end

      it_behaves_like 'a failing predicate'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dry-logic-0.1.0 spec/unit/predicates/bool_spec.rb