diff options
Diffstat (limited to 'activerecord/test/finder_test.rb')
-rwxr-xr-x | activerecord/test/finder_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/test/finder_test.rb b/activerecord/test/finder_test.rb index 93b0d06f4e..74ea11c944 100755 --- a/activerecord/test/finder_test.rb +++ b/activerecord/test/finder_test.rb @@ -143,10 +143,12 @@ class FinderTest < Test::Unit::TestCase def test_named_bind_arity assert_nothing_raised { bind '', {} } - assert_nothing_raised { bind '', :a => 1 } + assert_raises(ActiveRecord::PreparedStatementInvalid) { bind '', :a => 1 } assert_raises(ActiveRecord::PreparedStatementInvalid) { bind ':a', {} } # ' ruby-mode assert_nothing_raised { bind ':a', :a => 1 } # ' ruby-mode - assert_nothing_raised { bind ':a', :a => 1, :b => 2 } # ' ruby-mode + assert_raises(ActiveRecord::PreparedStatementInvalid) { bind ':a', :a => 1, :b => 2 } # ' ruby-mode + assert_nothing_raised { bind ':a :a', :a => 1 } # ' ruby-mode + assert_raises(ActiveRecord::PreparedStatementInvalid) { bind ':a :a', :a => 1, :b => 2 } # ' ruby-mode end def test_string_sanitation |