Sha256: 74ae576b355546ccc88781dc7115dd11cd1b32e0c1024163996bf0081acc9006

Contents?: true

Size: 884 Bytes

Versions: 113

Compression:

Stored size: 884 Bytes

Contents

require 'helper'

module Arel
  module Nodes
    class TestSelectCore < MiniTest::Unit::TestCase
      def test_clone
        core = Arel::Nodes::SelectCore.new
        core.froms       = %w[a b c]
        core.projections = %w[d e f]
        core.wheres      = %w[g h i]

        dolly = core.clone

        dolly.froms.must_equal core.froms
        dolly.projections.must_equal core.projections
        dolly.wheres.must_equal core.wheres

        dolly.froms.wont_be_same_as core.froms
        dolly.projections.wont_be_same_as core.projections
        dolly.wheres.wont_be_same_as core.wheres
      end

      def test_set_quantifier
        core = Arel::Nodes::SelectCore.new
        core.set_quantifier = Arel::Nodes::Distinct.new
        viz = Arel::Visitors::ToSql.new Table.engine.connection_pool
        assert_match 'DISTINCT', viz.accept(core)
      end
    end
  end
end

Version data entries

113 entries across 95 versions & 14 rubygems

Version Path
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/arel-3.0.3/test/nodes/test_select_core.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/test/nodes/test_select_core.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/arel-3.0.2/test/nodes/test_select_core.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/arel-3.0.3/test/nodes/test_select_core.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/arel-3.0.3/test/nodes/test_select_core.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/arel-3.0.3/test/nodes/test_select_core.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/arel-3.0.3/test/nodes/test_select_core.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/arel-3.0.3/test/nodes/test_select_core.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/arel-3.0.3/test/nodes/test_select_core.rb
arel-3.0.3 test/nodes/test_select_core.rb
swipe-rails-0.0.5 vendor/bundle/gems/arel-3.0.2/test/nodes/test_select_core.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/test/nodes/test_select_core.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/test/nodes/test_select_core.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/test/nodes/test_select_core.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/test/nodes/test_select_core.rb
challah-1.0.0.beta3 vendor/bundle/gems/arel-3.0.2/test/nodes/test_select_core.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/test/nodes/test_select_core.rb
challah-1.0.0.beta2 vendor/bundle/gems/arel-3.0.2/test/nodes/test_select_core.rb
challah-1.0.0.beta vendor/bundle/gems/arel-3.0.2/test/nodes/test_select_core.rb
fc-webicons-0.0.3 vendor/bundle/ruby/1.9.1/gems/arel-3.0.2/test/nodes/test_select_core.rb