Methods
Public Instance methods
we don’t allow full SQL, but might as well check the block format
[ show source ]
# File test/ar_base_tests_runner.rb, line 92
92: def test_count_by_sql
93: assert_raises(ActiveRecord::StatementInvalid) { Entrant.count_by_sql("SELECT COUNT(*) FROM entrant") }
94: assert_equal 0, Entrant.count(lambda{|rec| rec.recno > 3})
95: # this is just too wierd: assert_equal 1, Entrant.count([lambda{|rec| rec.recno > 2}])
96: assert_equal 2, Entrant.count{|rec| rec.recno > 1}
97: end