Sha256: 5399d8bbf9b9df6148429eab74de4505ad8c174a7bd3f31f19f6afcdec4efd59

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'
module Alf
  module Sql
    class Processor
      describe FromSelf, "on_nonjoin_exp" do

        subject{ FromSelf.new(builder).on_nonjoin_exp(expr) }

        context 'on select_exp' do
          let(:expr){
            select_all
          }

          let(:expected){
            with_exp(t1: select_all)
          }

          it{ should eq(expected) }
        end

        context 'on union' do
          let(:expr){
            union
          }

          let(:expected){
            with_exp(t1: union)
          }

          it{ should eq(expected) }
        end

        context 'on intersect' do
          let(:expr){
            intersect
          }

          let(:expected){
            with_exp(t1: intersect)
          }

          it{ should eq(expected) }
        end

        context 'on except' do
          let(:expr){
            except
          }

          let(:expected){
            with_exp(t1: except)
          }

          it{ should eq(expected) }
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-sql-0.16.3 spec/processor/from_self/test_on_nonjoin_exp.rb
alf-sql-0.16.2 spec/processor/from_self/test_on_nonjoin_exp.rb
alf-sql-0.16.1 spec/processor/from_self/test_on_nonjoin_exp.rb
alf-sql-0.16.0 spec/processor/from_self/test_on_nonjoin_exp.rb
alf-sql-0.15.0 spec/processor/from_self/test_on_nonjoin_exp.rb