Remove `assert_nothing_raised` deprecated usage.

This commit is contained in:
Lucas Mazza 2016-06-27 16:48:12 -03:00
parent a20cca6873
commit 656720583f
No known key found for this signature in database
GPG Key ID: C009F9A6BE4A44CB
3 changed files with 5 additions and 5 deletions

View File

@ -94,7 +94,7 @@ class SessionsControllerTest < Devise::ControllerTestCase
User.class_eval { attr_protected :email }
begin
assert_nothing_raised ActiveModel::MassAssignmentSecurity::Error do
assert_nothing_raised do
get :new, user: { email: "allez viens!" }
end
ensure

View File

@ -67,18 +67,18 @@ class DeviseTest < ActiveSupport::TestCase
end
test 'add new module using the helper method' do
assert_nothing_raised(Exception) { Devise.add_module(:coconut) }
Devise.add_module(:coconut)
assert_equal 1, Devise::ALL.select { |v| v == :coconut }.size
refute Devise::STRATEGIES.include?(:coconut)
refute defined?(Devise::Models::Coconut)
Devise::ALL.delete(:coconut)
assert_nothing_raised(Exception) { Devise.add_module(:banana, strategy: :fruits) }
Devise.add_module(:banana, strategy: :fruits)
assert_equal :fruits, Devise::STRATEGIES[:banana]
Devise::ALL.delete(:banana)
Devise::STRATEGIES.delete(:banana)
assert_nothing_raised(Exception) { Devise.add_module(:kivi, controller: :fruits) }
Devise.add_module(:kivi, controller: :fruits)
assert_equal :fruits, Devise::CONTROLLERS[:kivi]
Devise::ALL.delete(:kivi)
Devise::CONTROLLERS.delete(:kivi)

View File

@ -112,7 +112,7 @@ class CheckFieldsTest < ActiveSupport::TestCase
attr_accessor :encrypted_password, :email
end
assert_nothing_raised Devise::Models::MissingAttribute do
assert_nothing_raised do
Devise::Models.check_fields!(Player)
end
end