Sha256: ef0f92abe4c83aaabb3a9c553a70ab84375b66d6b5998f0c4a94ee274ec3f926

Contents?: true

Size: 536 Bytes

Versions: 22

Compression:

Stored size: 536 Bytes

Contents

require 'spec_helper'
class Predicate
  describe Or, "and_split" do

    let(:tautology){ Factory.tautology  }

    subject{ predicate.and_split(list) }

    context 'when attributes on one side' do
      let(:predicate){ Factory.eq(:x, 2) | Factory.eq(:y, 3) }

      context 'when fully covered' do
        let(:list){ [:x, :y] }

        it{ should eq([predicate, tautology]) }
      end

      context 'when fully disjoint' do
        let(:list){ [:z] }

        it{ should eq([tautology, predicate]) }
      end

    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
predicate-2.8.0 spec/nodes/or/test_and_split.rb
predicate-2.7.1 spec/nodes/or/test_and_split.rb
predicate-2.7.0 spec/nodes/or/test_and_split.rb
predicate-2.6.0 spec/nodes/or/test_and_split.rb
predicate-2.5.0 spec/nodes/or/test_and_split.rb
predicate-2.4.0 spec/nodes/or/test_and_split.rb
predicate-2.3.3 spec/nodes/or/test_and_split.rb
predicate-2.3.2 spec/nodes/or/test_and_split.rb
predicate-2.3.1 spec/nodes/or/test_and_split.rb
predicate-2.3.0 spec/nodes/or/test_and_split.rb
predicate-2.2.1 spec/nodes/or/test_and_split.rb
predicate-2.2.0 spec/nodes/or/test_and_split.rb
predicate-2.1.0 spec/nodes/or/test_and_split.rb
predicate-2.0.1 spec/nodes/or/test_and_split.rb
predicate-2.0.0 spec/nodes/or/test_and_split.rb
predicate-1.3.4 spec/nodes/or/test_and_split.rb
predicate-1.3.3 spec/nodes/or/test_and_split.rb
predicate-1.3.2 spec/nodes/or/test_and_split.rb
predicate-1.3.1 spec/nodes/or/test_and_split.rb
predicate-1.3.0 spec/nodes/or/test_and_split.rb