diff options
Diffstat (limited to 'activeresource/test/authorization_test.rb')
-rw-r--r-- | activeresource/test/authorization_test.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/activeresource/test/authorization_test.rb b/activeresource/test/authorization_test.rb index 9215227620..ead7f5c12f 100644 --- a/activeresource/test/authorization_test.rb +++ b/activeresource/test/authorization_test.rb @@ -19,7 +19,7 @@ class AuthorizationTest < Test::Unit::TestCase end def test_authorization_header - authorization_header = @authenticated_conn.send!(:authorization_header) + authorization_header = @authenticated_conn.__send__(:authorization_header) assert_equal @authorization_request_header['Authorization'], authorization_header['Authorization'] authorization = authorization_header["Authorization"].to_s.split @@ -29,7 +29,7 @@ class AuthorizationTest < Test::Unit::TestCase def test_authorization_header_with_username_but_no_password @conn = ActiveResource::Connection.new("http://david:@localhost") - authorization_header = @conn.send!(:authorization_header) + authorization_header = @conn.__send__(:authorization_header) authorization = authorization_header["Authorization"].to_s.split assert_equal "Basic", authorization[0] @@ -38,7 +38,7 @@ class AuthorizationTest < Test::Unit::TestCase def test_authorization_header_with_password_but_no_username @conn = ActiveResource::Connection.new("http://:test123@localhost") - authorization_header = @conn.send!(:authorization_header) + authorization_header = @conn.__send__(:authorization_header) authorization = authorization_header["Authorization"].to_s.split assert_equal "Basic", authorization[0] @@ -47,7 +47,7 @@ class AuthorizationTest < Test::Unit::TestCase def test_authorization_header_with_decoded_credentials_from_url @conn = ActiveResource::Connection.new("http://my%40email.com:%31%32%33@localhost") - authorization_header = @conn.send!(:authorization_header) + authorization_header = @conn.__send__(:authorization_header) authorization = authorization_header["Authorization"].to_s.split assert_equal "Basic", authorization[0] @@ -58,7 +58,7 @@ class AuthorizationTest < Test::Unit::TestCase @authenticated_conn = ActiveResource::Connection.new("http://@localhost") @authenticated_conn.user = 'david' @authenticated_conn.password = 'test123' - authorization_header = @authenticated_conn.send!(:authorization_header) + authorization_header = @authenticated_conn.__send__(:authorization_header) assert_equal @authorization_request_header['Authorization'], authorization_header['Authorization'] authorization = authorization_header["Authorization"].to_s.split @@ -69,7 +69,7 @@ class AuthorizationTest < Test::Unit::TestCase def test_authorization_header_explicitly_setting_username_but_no_password @conn = ActiveResource::Connection.new("http://@localhost") @conn.user = "david" - authorization_header = @conn.send!(:authorization_header) + authorization_header = @conn.__send__(:authorization_header) authorization = authorization_header["Authorization"].to_s.split assert_equal "Basic", authorization[0] @@ -79,7 +79,7 @@ class AuthorizationTest < Test::Unit::TestCase def test_authorization_header_explicitly_setting_password_but_no_username @conn = ActiveResource::Connection.new("http://@localhost") @conn.password = "test123" - authorization_header = @conn.send!(:authorization_header) + authorization_header = @conn.__send__(:authorization_header) authorization = authorization_header["Authorization"].to_s.split assert_equal "Basic", authorization[0] @@ -116,7 +116,7 @@ class AuthorizationTest < Test::Unit::TestCase protected def assert_response_raises(klass, code) assert_raise(klass, "Expected response code #{code} to raise #{klass}") do - @conn.send!(:handle_response, Response.new(code)) + @conn.__send__(:handle_response, Response.new(code)) end end end |