diff options
author | Daniel Colson <danieljamescolson@gmail.com> | 2018-01-24 22:04:11 -0500 |
---|---|---|
committer | Daniel Colson <danieljamescolson@gmail.com> | 2018-01-25 23:32:58 -0500 |
commit | 211adb47e76b358ea15a3f756431c042ab231c23 (patch) | |
tree | f688daea11af3dce588e3c5a9791722a2f3aaec5 /activerecord/test/cases/dirty_test.rb | |
parent | 0d50cae996c51630361e8514e1f168b0c48957e1 (diff) | |
download | rails-211adb47e76b358ea15a3f756431c042ab231c23.tar.gz rails-211adb47e76b358ea15a3f756431c042ab231c23.tar.bz2 rails-211adb47e76b358ea15a3f756431c042ab231c23.zip |
Change refute to assert_not
Diffstat (limited to 'activerecord/test/cases/dirty_test.rb')
-rw-r--r-- | activerecord/test/cases/dirty_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/test/cases/dirty_test.rb b/activerecord/test/cases/dirty_test.rb index d4408776d3..5cb4aa3287 100644 --- a/activerecord/test/cases/dirty_test.rb +++ b/activerecord/test/cases/dirty_test.rb @@ -762,7 +762,7 @@ class DirtyTest < ActiveRecord::TestCase test "attributes assigned but not selected are dirty" do person = Person.select(:id).first - refute person.changed? + assert_not person.changed? person.first_name = "Sean" assert person.changed? @@ -782,13 +782,13 @@ class DirtyTest < ActiveRecord::TestCase person = Person.create!(first_name: "Sean") assert person.saved_change_to_first_name? - refute person.saved_change_to_gender? + assert_not person.saved_change_to_gender? assert person.saved_change_to_first_name?(from: nil, to: "Sean") assert person.saved_change_to_first_name?(from: nil) assert person.saved_change_to_first_name?(to: "Sean") - refute person.saved_change_to_first_name?(from: "Jim", to: "Sean") - refute person.saved_change_to_first_name?(from: "Jim") - refute person.saved_change_to_first_name?(to: "Jim") + assert_not person.saved_change_to_first_name?(from: "Jim", to: "Sean") + assert_not person.saved_change_to_first_name?(from: "Jim") + assert_not person.saved_change_to_first_name?(to: "Jim") end test "saved_change_to_attribute returns the change that occurred in the last save" do @@ -827,7 +827,7 @@ class DirtyTest < ActiveRecord::TestCase person.save - refute person.saved_changes? + assert_not person.saved_changes? end test "saved_changes returns a hash of all the changes that occurred" do @@ -857,7 +857,7 @@ class DirtyTest < ActiveRecord::TestCase end person = klass.create!(first_name: "Sean") - refute person.changed? + assert_not person.changed? end private |