diff options
author | Tara Scherner de la Fuente <tara.scherner@livingsocial.com> | 2016-02-19 20:05:49 -0800 |
---|---|---|
committer | Tara Scherner de la Fuente <tara.scherner@livingsocial.com> | 2016-02-22 22:56:23 -0800 |
commit | 926a24a7510be3d7f611c03feaf83f50d36076e8 (patch) | |
tree | 2a0ebb41c6f3eea9456bff1d7ebd79ac647dd6bd /activemodel | |
parent | 42ad173d19a2220996ec4172d05681bde2e7320b (diff) | |
download | rails-926a24a7510be3d7f611c03feaf83f50d36076e8.tar.gz rails-926a24a7510be3d7f611c03feaf83f50d36076e8.tar.bz2 rails-926a24a7510be3d7f611c03feaf83f50d36076e8.zip |
remove args from assert_nothing_raised in tests
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/test/cases/validations/format_validation_test.rb | 2 | ||||
-rw-r--r-- | activemodel/test/cases/validations/inclusion_validation_test.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/activemodel/test/cases/validations/format_validation_test.rb b/activemodel/test/cases/validations/format_validation_test.rb index 86bbbe6ebe..ea4c2ee7df 100644 --- a/activemodel/test/cases/validations/format_validation_test.rb +++ b/activemodel/test/cases/validations/format_validation_test.rb @@ -73,7 +73,7 @@ class PresenceValidationTest < ActiveModel::TestCase end def test_validate_format_of_with_multiline_regexp_and_option - assert_nothing_raised(ArgumentError) do + assert_nothing_raised do Topic.validates_format_of(:title, with: /^Valid Title$/, multiline: true) end end diff --git a/activemodel/test/cases/validations/inclusion_validation_test.rb b/activemodel/test/cases/validations/inclusion_validation_test.rb index 55d1fb4dcb..6cb96343fa 100644 --- a/activemodel/test/cases/validations/inclusion_validation_test.rb +++ b/activemodel/test/cases/validations/inclusion_validation_test.rb @@ -58,9 +58,9 @@ class InclusionValidationTest < ActiveModel::TestCase assert_raise(ArgumentError) { Topic.validates_inclusion_of(:title, in: nil) } assert_raise(ArgumentError) { Topic.validates_inclusion_of(:title, in: 0) } - assert_nothing_raised(ArgumentError) { Topic.validates_inclusion_of(:title, in: "hi!") } - assert_nothing_raised(ArgumentError) { Topic.validates_inclusion_of(:title, in: {}) } - assert_nothing_raised(ArgumentError) { Topic.validates_inclusion_of(:title, in: []) } + assert_nothing_raised { Topic.validates_inclusion_of(:title, in: "hi!") } + assert_nothing_raised { Topic.validates_inclusion_of(:title, in: {}) } + assert_nothing_raised { Topic.validates_inclusion_of(:title, in: []) } end def test_validates_inclusion_of_with_allow_nil |