From 6d51e67fac84de1acb63c73e6a8ee3f802d5a642 Mon Sep 17 00:00:00 2001 From: Vasiliy Ermolovich Date: Sat, 4 Jan 2014 19:19:13 +0300 Subject: [PATCH] properly change devise config in specs --- test/controllers/internal_helpers_test.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/controllers/internal_helpers_test.rb b/test/controllers/internal_helpers_test.rb index 59dc7a59..07aa6b95 100644 --- a/test/controllers/internal_helpers_test.rb +++ b/test/controllers/internal_helpers_test.rb @@ -113,8 +113,11 @@ class HelpersTest < ActionController::TestCase test 'navigational_formats not returning a wild card' do MyController.send(:public, :navigational_formats) - Devise.navigational_formats = [:"*/*", :html] - assert_not @controller.navigational_formats.include?(:"*/*") + + swap Devise, :navigational_formats => ['*/*', :html] do + assert_not @controller.navigational_formats.include?("*/*") + end + MyController.send(:protected, :navigational_formats) end end