aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2013-04-28 12:03:26 +0200
committerXavier Noria <fxn@hashref.com>2013-04-28 12:03:59 +0200
commit607f136d52e984323cbe2938c04c660ca55a5039 (patch)
tree85eb7a2764caa5f0c872bc27fbddbae7178bf2a9 /activerecord/test/cases
parent31aab3ee57bc2cb31bcc0bf459c38b72d4ec3c24 (diff)
downloadrails-607f136d52e984323cbe2938c04c660ca55a5039.tar.gz
rails-607f136d52e984323cbe2938c04c660ca55a5039.tar.bz2
rails-607f136d52e984323cbe2938c04c660ca55a5039.zip
fixes a test, and explains why AR::AttributeMethods checks defined?(@attributes) in some places
Diffstat (limited to 'activerecord/test/cases')
-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 387c741762..d9c032392d 100644
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -141,13 +141,10 @@ class AttributeMethodsTest < ActiveRecord::TestCase
assert_respond_to topic, :title
end
- # IRB inspects the return value of "MyModel.allocate"
- # by inspecting it.
+ # IRB inspects the return value of "MyModel.allocate".
def test_allocated_object_can_be_inspected
topic = Topic.allocate
- topic.instance_eval { @attributes = nil }
- assert_nothing_raised { topic.inspect }
- assert topic.inspect, "#<Topic not initialized>"
+ assert_equal "#<Topic not initialized>", topic.inspect
end
def test_array_content