aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/arel/unit/relations/join_spec.rb12
-rw-r--r--spec/arel/unit/relations/relation_spec.rb4
2 files changed, 8 insertions, 8 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{
diff --git a/spec/arel/unit/relations/relation_spec.rb b/spec/arel/unit/relations/relation_spec.rb
index 7df10be59c..6a61f39966 100644
--- a/spec/arel/unit/relations/relation_spec.rb
+++ b/spec/arel/unit/relations/relation_spec.rb
@@ -34,7 +34,7 @@ module Arel
describe 'when given a relation' do
it "manufactures an inner join operation between those two relations" do
@relation.join(@relation).on(@predicate). \
- should == Join.new("INNER JOIN", @relation, @relation, @predicate)
+ should == InnerJoin.new(@relation, @relation, @predicate)
end
end
@@ -54,7 +54,7 @@ module Arel
describe '#outer_join' do
it "manufactures a left outer join operation between those two relations" do
@relation.outer_join(@relation).on(@predicate). \
- should == Join.new("LEFT OUTER JOIN", @relation, @relation, @predicate)
+ should == OuterJoin.new(@relation, @relation, @predicate)
end
end
end