Sha256: e5c6998f90b0c537c606e1997975aec7e4fc2bc8c244da91de61a0e46ab34b65
Contents?: true
Size: 805 Bytes
Versions: 4
Compression:
Stored size: 805 Bytes
Contents
# frozen_string_literal: true require 'dry/logic/predicates' RSpec.describe Dry::Logic::Predicates do describe '#included_in?' do let(:predicate_name) { :included_in? } context 'when value is present in list' do let(:arguments_list) do [ [['Jill', 'John'], 'Jill'], [['Jill', 'John'], 'John'], [1..2, 1], [1..2, 2], [[nil, false], nil], [[nil, false], false] ] end it_behaves_like 'a passing predicate' end context 'with value is not present in list' do let(:arguments_list) do [ [['Jill', 'John'], 'Jack'], [1..2, 0], [1..2, 3], [[nil, false], true] ] end it_behaves_like 'a failing predicate' end end end
Version data entries
4 entries across 4 versions & 1 rubygems