From b8a4dabab94bfaa73ec031337ce9ef9abd798383 Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Sat, 5 Jan 2008 16:04:41 -0800 Subject: quoting --- spec/relations/join_relation_spec.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'spec/relations') diff --git a/spec/relations/join_relation_spec.rb b/spec/relations/join_relation_spec.rb index b70bf553b1..ece7e61cc1 100644 --- a/spec/relations/join_relation_spec.rb +++ b/spec/relations/join_relation_spec.rb @@ -20,23 +20,18 @@ describe JoinRelation do describe '#qualify' do it 'distributes over the relations and predicates' do - JoinRelation.new(@relation1, @relation2, @predicate).qualify. \ - should == JoinRelation.new(@relation1.qualify, @relation2.qualify, @predicate.qualify) + InnerJoinRelation.new(@relation1, @relation2, @predicate).qualify. \ + should == InnerJoinRelation.new(@relation1.qualify, @relation2.qualify, @predicate.qualify) end end describe '#to_sql' do before do @relation1 = @relation1.select(@relation1[:id] == @relation2[:foo_id]) - class ConcreteJoinRelation < JoinRelation - def join_type - :inner_join - end - end end it 'manufactures sql joining the two tables on the predicate, merging the selects' do - ConcreteJoinRelation.new(@relation1, @relation2, @predicate).to_s.should == SelectBuilder.new do + InnerJoinRelation.new(@relation1, @relation2, @predicate).to_s.should == SelectBuilder.new do select do column :foo, :name column :foo, :id -- cgit v1.2.3