Permalink
Browse files

Use assert_nil instead of assert_equal

  • Loading branch information...
1 parent daa7b4e commit f3aaf6d7d192eeead15458e2d042811b9681dd9c @rafaelfranca rafaelfranca committed Nov 28, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 activerecord/CHANGELOG.md
  2. +2 −2 activerecord/test/cases/dirty_test.rb
@@ -1,6 +1,6 @@
## Rails 4.0.0 (unreleased) ##
-* Fix dirty attribute checks for TimeZoneConversion with nil and blank
+* Fix dirty attribute checks for `TimeZoneConversion` with nil and blank
datetime attributes. Setting a nil datetime to a blank string should not
result in a change being flagged. Fix #8310
@@ -209,10 +209,10 @@ def test_nullable_datetime_not_marked_as_changed_if_new_value_is_blank
target.table_name = 'topics'
topic = target.create
- assert_equal nil, topic.written_on
+ assert_nil topic.written_on
topic.written_on = ""
- assert_equal nil, topic.written_on
+ assert_nil topic.written_on
assert !topic.written_on_changed?
end
end

0 comments on commit f3aaf6d

Please sign in to comment.