aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-08-30 14:08:10 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2010-09-09 14:37:58 -0700
commitd79b1aa0ba96641fd6d8c9f4e79fae27e4fa9a83 (patch)
tree3ce3ce0f17b6922c2ed8613ee52b988ae2d0052e /activerecord
parentcb67d166297ff6745358b804c61277c902e87023 (diff)
downloadrails-d79b1aa0ba96641fd6d8c9f4e79fae27e4fa9a83.tar.gz
rails-d79b1aa0ba96641fd6d8c9f4e79fae27e4fa9a83.tar.bz2
rails-d79b1aa0ba96641fd6d8c9f4e79fae27e4fa9a83.zip
Fewer object allocations
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/attribute_methods_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb
index 3c4fa4fd3f..1750bf004a 100644
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -541,7 +541,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase
topic = @target.new(:title => "The pros and cons of programming naked.")
assert !topic.respond_to?(:title)
exception = assert_raise(NoMethodError) { topic.title }
- assert_equal "Attempt to call private method", exception.message
+ assert_match %r(^Attempt to call private method), exception.message
assert_equal "I'm private", topic.send(:title)
end
@@ -551,7 +551,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase
topic = @target.new
assert !topic.respond_to?(:title=)
exception = assert_raise(NoMethodError) { topic.title = "Pants"}
- assert_equal "Attempt to call private method", exception.message
+ assert_match %r(^Attempt to call private method), exception.message
topic.send(:title=, "Very large pants")
end
@@ -561,7 +561,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase
topic = @target.new(:title => "Isaac Newton's pants")
assert !topic.respond_to?(:title?)
exception = assert_raise(NoMethodError) { topic.title? }
- assert_equal "Attempt to call private method", exception.message
+ assert_match %r(^Attempt to call private method), exception.message
assert topic.send(:title?)
end