Sha256: aadbf1d5f5f54723ff308eb8214aa30418e608d9cf221f6516fb293f67d69963

Contents?: true

Size: 581 Bytes

Versions: 2

Compression:

Stored size: 581 Bytes

Contents

require 'spec_helper'
class Predicate
  describe Eq, "&" do

    let(:left){
      Factory.eq(:x, 2)
    }

    subject{ left & right }

    context 'with an eq leading to a contradiction' do
      let(:right){ Factory.eq(:x, 3) }

      it{ should be_a(Contradiction) }
    end

    context 'with an IN on same variable and literal' do
      let(:right){ Factory.in(:x, [3,4]) }

      it{ should be(left) }
    end

    context 'with an IN on same variable and opaque' do
      let(:right){ Factory.in(:x, Factory.opaque([3,4])) }

      it{ should be_a(And) }
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
predicate-2.2.0 spec/nodes/eq/test_and.rb
predicate-2.1.0 spec/nodes/eq/test_and.rb