aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-05-16 13:33:35 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-05-16 13:33:35 -0700
commit28574961fb5a6cdc7cdf420e1e3694653619bb5b (patch)
tree25eb752990d27d0a081ae9fa6a9abfb4b4b3f960 /activerecord/test
parent711097e6a5af61a31a0547223038a4b5e1d59366 (diff)
downloadrails-28574961fb5a6cdc7cdf420e1e3694653619bb5b.tar.gz
rails-28574961fb5a6cdc7cdf420e1e3694653619bb5b.tar.bz2
rails-28574961fb5a6cdc7cdf420e1e3694653619bb5b.zip
test refactor
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/attribute_methods_test.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb
index d882d40ecb..f10732ddda 100644
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -712,12 +712,9 @@ class AttributeMethodsTest < ActiveRecord::TestCase
end
def test_bulk_update_raise_unknown_attribute_errro
- error = nil
- begin
+ error = assert_raises(ActiveRecord::UnknownAttributeError) {
@target.new(:hello => "world")
- rescue ActiveRecord::UnknownAttributeError => error
- end
- assert error
+ }
assert @target, error.record
assert "hello", error.attribute
assert "unknown attribute: hello", error.message