From 00d1482fefa1cf9c3753b58f4fe9b580c52ae935 Mon Sep 17 00:00:00 2001 From: Samuel Kadolph Date: Fri, 27 May 2011 17:21:40 -0400 Subject: Include Arel::Predicates to Arel::Nodes::Function so you can do table[:id].count.eq(2) --- test/nodes/test_count.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/nodes/test_count.rb b/test/nodes/test_count.rb index afa423e8f5..be53b86855 100644 --- a/test/nodes/test_count.rb +++ b/test/nodes/test_count.rb @@ -15,4 +15,13 @@ describe Arel::Nodes::Count do } end end + + describe "eq" do + it "should compare the count" do + table = Arel::Table.new :users + table[:id].count.eq(2).to_sql.must_be_like %{ + COUNT("users"."id") = 2 + } + end + end end -- cgit v1.2.3