aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/unit/relations/join_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/arel/unit/relations/join_spec.rb')
-rw-r--r--spec/arel/unit/relations/join_spec.rb12
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{