diff options
Diffstat (limited to 'spec/relations/selection_relation_spec.rb')
-rw-r--r-- | spec/relations/selection_relation_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/relations/selection_relation_spec.rb b/spec/relations/selection_relation_spec.rb index ceb771b46d..1a7f9e6659 100644 --- a/spec/relations/selection_relation_spec.rb +++ b/spec/relations/selection_relation_spec.rb @@ -28,8 +28,11 @@ describe SelectionRelation do describe '#to_sql' do it "manufactures sql with where clause conditions" do - SelectionRelation.new(@relation1, @predicate1).to_sql.should == SelectBuilder.new do - select { all } + SelectionRelation.new(@relation1, @predicate1).to_sql.to_s.should == SelectBuilder.new do + select do + column :foo, :name + column :foo, :id + end from :foo where do equals do @@ -37,7 +40,7 @@ describe SelectionRelation do column :bar, :foo_id end end - end + end.to_s end end end
\ No newline at end of file |