Cleaning up test helpers related to OmniAuth.

Developers should rely on OmniAuth's new testing API. Check
https://github.com/intridea/omniauth/wiki/Integration-Testing
for more details.
This commit is contained in:
Vinicius Baggio
2011-02-24 16:50:22 -03:00
parent b5e289c9a8
commit 352edc024b
8 changed files with 98 additions and 115 deletions

View File

@@ -0,0 +1,25 @@
require 'test_helper'
class OmniAuthTestHelpersTest < ActiveSupport::TestCase
test "Assert that stub! raises deprecation error" do
assert_raises Devise::OmniAuth::TestHelpers::DeprecationError do
Devise::OmniAuth::TestHelpers.stub!
end
end
test "Assert that reset_stubs! raises deprecation error" do
assert_raises Devise::OmniAuth::TestHelpers::DeprecationError do
Devise::OmniAuth::TestHelpers.reset_stubs!
end
end
test "Assert that short_circuit_authorizers! warns about deprecation" do
Devise::OmniAuth::TestHelpers.short_circuit_authorizers!
assert ::OmniAuth.config.test_mode
end
test "Assert that unshort_circuit_authorizers! warns about deprecation" do
Devise::OmniAuth::TestHelpers.unshort_circuit_authorizers!
assert ! ::OmniAuth.config.test_mode
end
end