aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-04 16:05:49 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-04 16:05:49 -0700
commit1b4e7715d3872cee9fbcd3ce0b6713294d04b5bc (patch)
treeba70138cc5839e79cbdfce50bcadbaf61a90b7a1 /spec
parentfa12b394ff6240358a32ecff63700f85084da5ac (diff)
downloadrails-1b4e7715d3872cee9fbcd3ce0b6713294d04b5bc.tar.gz
rails-1b4e7715d3872cee9fbcd3ce0b6713294d04b5bc.tar.bz2
rails-1b4e7715d3872cee9fbcd3ce0b6713294d04b5bc.zip
adding a spec for Group#to_sql
Diffstat (limited to 'spec')
-rw-r--r--spec/algebra/unit/relations/relation_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/algebra/unit/relations/relation_spec.rb b/spec/algebra/unit/relations/relation_spec.rb
index 4a7d9be0dc..1219f80bc3 100644
--- a/spec/algebra/unit/relations/relation_spec.rb
+++ b/spec/algebra/unit/relations/relation_spec.rb
@@ -164,6 +164,8 @@ module Arel
group.relation.should == @relation
group.groupings.should == [@attribute1, @attribute2]
group.should be_kind_of Group
+ sql = group.to_sql
+ sql.should =~ /GROUP BY/
end
describe 'when given blank groupings' do