diff options
-rw-r--r-- | activerecord/lib/active_record/relation/calculations.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/attribute_methods_test.rb | 15 |
2 files changed, 3 insertions, 14 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index c8edadf804..741f94f777 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -1,5 +1,3 @@ -require 'active_support/core_ext/object/try' - module ActiveRecord module Calculations # Count the records. diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index e0cde4f7f3..c503c21e27 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -313,26 +313,17 @@ class AttributeMethodsTest < ActiveRecord::TestCase def test_read_write_boolean_attribute topic = Topic.new - # puts "" - # puts "New Topic" - # puts topic.inspect topic.approved = "false" - # puts "Expecting false" - # puts topic.inspect assert !topic.approved?, "approved should be false" + topic.approved = "false" - # puts "Expecting false" - # puts topic.inspect assert !topic.approved?, "approved should be false" + topic.approved = "true" - # puts "Expecting true" - # puts topic.inspect assert topic.approved?, "approved should be true" + topic.approved = "true" - # puts "Expecting true" - # puts topic.inspect assert topic.approved?, "approved should be true" - # puts "" end def test_overridden_write_attribute |