diff options
author | Daniel Colson <danieljamescolson@gmail.com> | 2018-01-25 18:16:57 -0500 |
---|---|---|
committer | Daniel Colson <danieljamescolson@gmail.com> | 2018-01-25 23:32:59 -0500 |
commit | 82c39e1a0b5114e2d89a80883a41090567a83196 (patch) | |
tree | 476f620e0224130ca3dca3ed4e9b5a58fb0d5da9 /activemodel/test/cases/errors_test.rb | |
parent | 94333a4c31bd10c1f358c538a167e6a4589bae2d (diff) | |
download | rails-82c39e1a0b5114e2d89a80883a41090567a83196.tar.gz rails-82c39e1a0b5114e2d89a80883a41090567a83196.tar.bz2 rails-82c39e1a0b5114e2d89a80883a41090567a83196.zip |
Use assert_empty and assert_not_empty
Diffstat (limited to 'activemodel/test/cases/errors_test.rb')
-rw-r--r-- | activemodel/test/cases/errors_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/test/cases/errors_test.rb b/activemodel/test/cases/errors_test.rb index 7d155170d3..fe351f922d 100644 --- a/activemodel/test/cases/errors_test.rb +++ b/activemodel/test/cases/errors_test.rb @@ -83,7 +83,7 @@ class ErrorsTest < ActiveModel::TestCase assert_equal 1, person.errors.count person.errors.clear - assert_predicate person.errors, :empty? + assert_empty person.errors end test "error access is indifferent" do @@ -128,7 +128,7 @@ class ErrorsTest < ActiveModel::TestCase test "detecting whether there are errors with empty?, blank?, include?" do person = Person.new person.errors[:foo] - assert_predicate person.errors, :empty? + assert_empty person.errors assert_predicate person.errors, :blank? assert_not_includes person.errors, :foo end @@ -371,7 +371,7 @@ class ErrorsTest < ActiveModel::TestCase assert_equal 1, person.errors.details.count person.errors.clear - assert_predicate person.errors.details, :empty? + assert_empty person.errors.details end test "copy errors" do |