From bdca9ed42ffea10aa6989ea3ecebedb424fa01ed Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 17 May 2009 14:20:29 -0400 Subject: moved sql related code to its own engine area Conflicts: lib/arel/engine.rb lib/arel/extensions/object.rb lib/arel/predicates.rb lib/arel/primitives/attribute.rb lib/arel/primitives/expression.rb lib/arel/primitives/value.rb lib/arel/relations/operations/join.rb lib/arel/relations/relation.rb lib/arel/relations/utilities/externalization.rb lib/arel/relations/utilities/nil.rb lib/arel/relations/writes/delete.rb lib/arel/relations/writes/insert.rb lib/arel/relations/writes/update.rb spec/arel/unit/relations/skip_spec.rb spec/arel/unit/relations/take_spec.rb spec/spec_helper.rb --- spec/arel/unit/relations/skip_spec.rb | 2 +- spec/arel/unit/relations/table_spec.rb | 4 ++-- spec/arel/unit/relations/take_spec.rb | 2 +- spec/spec_helper.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'spec') diff --git a/spec/arel/unit/relations/skip_spec.rb b/spec/arel/unit/relations/skip_spec.rb index 0653d795b1..2c8f6ccadb 100644 --- a/spec/arel/unit/relations/skip_spec.rb +++ b/spec/arel/unit/relations/skip_spec.rb @@ -9,7 +9,7 @@ module Arel describe '#to_sql' do it "manufactures sql with limit and offset" do - sql = Skip.new(@relation, @skipped).to_s + sql = Skip.new(@relation, @skipped).to_sql adapter_is :mysql do sql.should be_like(%Q{ diff --git a/spec/arel/unit/relations/table_spec.rb b/spec/arel/unit/relations/table_spec.rb index 08486c7b6c..211e6921f8 100644 --- a/spec/arel/unit/relations/table_spec.rb +++ b/spec/arel/unit/relations/table_spec.rb @@ -87,12 +87,12 @@ module Arel describe '#engine' do it "defaults to global engine" do - Table.engine = engine = Engine.new + Table.engine = engine = Sql::Engine.new Table.new(:users).engine.should == engine end it "can be specified" do - Table.new(:users, engine = Engine.new).engine.should == engine + Table.new(:users, engine = Sql::Engine.new).engine.should == engine end end end diff --git a/spec/arel/unit/relations/take_spec.rb b/spec/arel/unit/relations/take_spec.rb index 911b84e01e..d6442fc9d1 100644 --- a/spec/arel/unit/relations/take_spec.rb +++ b/spec/arel/unit/relations/take_spec.rb @@ -9,7 +9,7 @@ module Arel describe '#to_sql' do it "manufactures sql with limit and offset" do - sql = Take.new(@relation, @taken).to_s + sql = Take.new(@relation, @taken).to_sql adapter_is :mysql do sql.should be_like(%Q{ diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8d515d66f1..6a9a2ef23c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -30,6 +30,6 @@ Spec::Runner.configure do |config| config.include AdapterGuards config.mock_with :rr config.before do - Arel::Table.engine = Arel::Engine.new(ActiveRecord::Base) + Arel::Table.engine = Arel::Sql::Engine.new(ActiveRecord::Base) end end -- cgit v1.2.3