diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 14:49:56 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 14:49:56 -0400 |
commit | 3a6e8e5a3f99841691b70b89b0a10f836e6ec071 (patch) | |
tree | 89e59775b729616ca9cb4a4f1f70415af35ce3d7 /spec/arel/unit/relations/join_spec.rb | |
parent | 892337509b2bd269920dc567bc48c6a28c7222d2 (diff) | |
download | rails-3a6e8e5a3f99841691b70b89b0a10f836e6ec071.tar.gz rails-3a6e8e5a3f99841691b70b89b0a10f836e6ec071.tar.bz2 rails-3a6e8e5a3f99841691b70b89b0a10f836e6ec071.zip |
join sql stuff moved into sql adapter
Conflicts:
lib/arel/algebra/primitives/value.rb
lib/arel/algebra/relations/operations/join.rb
lib/arel/algebra/relations/relation.rb
spec/arel/unit/relations/join_spec.rb
Diffstat (limited to 'spec/arel/unit/relations/join_spec.rb')
-rw-r--r-- | spec/arel/unit/relations/join_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/arel/unit/relations/join_spec.rb b/spec/arel/unit/relations/join_spec.rb index fa6bbbe216..0e3e6ef16b 100644 --- a/spec/arel/unit/relations/join_spec.rb +++ b/spec/arel/unit/relations/join_spec.rb @@ -10,20 +10,20 @@ module Arel describe 'hashing' do it 'implements hash equality' do - Join.new("INNER JOIN", @relation1, @relation2, @predicate) \ - .should hash_the_same_as(Join.new("INNER JOIN", @relation1, @relation2, @predicate)) + InnerJoin.new(@relation1, @relation2, @predicate) \ + .should hash_the_same_as(InnerJoin.new(@relation1, @relation2, @predicate)) end end describe '#engine' do it "delegates to a relation's engine" do - Join.new("INNER JOIN", @relation1, @relation2, @predicate).engine.should == @relation1.engine + InnerJoin.new(@relation1, @relation2, @predicate).engine.should == @relation1.engine end end describe '#attributes' do it 'combines the attributes of the two relations' do - join = Join.new("INNER JOIN", @relation1, @relation2, @predicate) + join = InnerJoin.new(@relation1, @relation2, @predicate) join.attributes.should == (@relation1.attributes + @relation2.attributes).collect { |a| a.bind(join) } end @@ -32,7 +32,7 @@ module Arel describe '#to_sql' do describe 'when joining with another relation' do it 'manufactures sql joining the two tables on the predicate' do - sql = Join.new("INNER JOIN", @relation1, @relation2, @predicate).to_sql + sql = InnerJoin.new(@relation1, @relation2, @predicate).to_sql adapter_is :mysql do sql.should be_like(%Q{ @@ -54,7 +54,7 @@ module Arel describe 'when joining with a string' do it "passes the string through to the where clause" do - sql = Join.new("INNER JOIN asdf ON fdsa", @relation1).to_sql + sql = StringJoin.new(@relation1, "INNER JOIN asdf ON fdsa").to_sql adapter_is :mysql do sql.should be_like(%Q{ |