Sha256: fa34cb5fcca556282edac4ff410fcd46452897641a25adfd0b4e7fccbc17d314

Contents?: true

Size: 690 Bytes

Versions: 13

Compression:

Stored size: 690 Bytes

Contents

require_relative "shared/a_comparison_factory_method"
class Predicate
  describe Factory, 'in' do

    context 'with values on the right' do
      subject{ Factory.in(:x, [2, 3]) }

      it 'is a In' do
        expect(subject).to be_a(In)
      end

      it 'has the expected AST' do
        expect(subject).to eql([:in, [:identifier, :x], [:literal, [2, 3]]])
      end
    end

    context 'with opaque on the right' do
      subject{ Factory.in(:x, Factory.opaque([2, 3])) }

      it 'is a In' do
        expect(subject).to be_a(In)
      end

      it 'has the expected AST' do
        expect(subject).to eql([:in, [:identifier, :x], [:opaque, [2, 3]]])
      end
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
predicate-2.8.0 spec/factory/test_in.rb
predicate-2.7.1 spec/factory/test_in.rb
predicate-2.7.0 spec/factory/test_in.rb
predicate-2.6.0 spec/factory/test_in.rb
predicate-2.5.0 spec/factory/test_in.rb
predicate-2.4.0 spec/factory/test_in.rb
predicate-2.3.3 spec/factory/test_in.rb
predicate-2.3.2 spec/factory/test_in.rb
predicate-2.3.1 spec/factory/test_in.rb
predicate-2.3.0 spec/factory/test_in.rb
predicate-2.2.1 spec/factory/test_in.rb
predicate-2.2.0 spec/factory/test_in.rb
predicate-2.1.0 spec/factory/test_in.rb