Sha256: cb88a01566804b18eee0bf789f4a8fb21c2aa49a7ef5e6f01bf2a9ed0cd8db4a

Contents?: true

Size: 618 Bytes

Versions: 10

Compression:

Stored size: 618 Bytes

Contents

require 'spec_helper'
require 'conceptql/nodes/except'
require_relative 'query_double'

describe ConceptQL::Nodes::Except do
  it 'behaves itself' do
    ConceptQL::Nodes::Except.new.must_behave_like(:evaluator)
  end

  describe '#query' do
    it 'uses right stream as argument to EXCEPT against left stream' do
      double1 = QueryDouble.new(1)
      double2 = QueryDouble.new(2)
      double1.must_behave_like(:evaluator)
      ConceptQL::Nodes::Except.new(left: double1, right: double2).query(Sequel.mock).sql.must_equal "SELECT * FROM (SELECT * FROM table1 EXCEPT SELECT * FROM table2) AS t1"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
conceptql-0.1.1 spec/conceptql/nodes/except_spec.rb
conceptql-0.1.0 spec/conceptql/nodes/except_spec.rb
conceptql-0.0.9 spec/conceptql/nodes/except_spec.rb
conceptql-0.0.8 spec/conceptql/nodes/except_spec.rb
conceptql-0.0.7 spec/conceptql/nodes/except_spec.rb
conceptql-0.0.6 spec/conceptql/nodes/except_spec.rb
conceptql-0.0.5 spec/conceptql/nodes/except_spec.rb
conceptql-0.0.4 spec/conceptql/nodes/except_spec.rb
conceptql-0.0.3 spec/conceptql/nodes/except_spec.rb
conceptql-0.0.1 spec/conceptql/nodes/except_spec.rb