Skip to content

Commit

Permalink
Remove assert_nothing_raised deprecated usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmazza committed Jun 27, 2016
1 parent a20cca6 commit 6567205
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/controllers/sessions_controller_test.rb
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/devise_test.rb
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/models_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 6567205

Please sign in to comment.