Skip to content

Commit 705ae93

Browse files
committed
Silencing some test warnings
1 parent 0a03542 commit 705ae93

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

test/integration/consumer_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_that_signing_post_params_works
8686

8787
assert_equal 'POST', request.method
8888
assert_equal '/test', request.path
89-
assert_match /key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3[Dd]&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0/, request.body.split("&").sort.join("&")
89+
assert_match(/key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3[Dd]&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0/, request.body.split("&").sort.join("&"))
9090
assert_equal nil, request['authorization']
9191
end
9292

@@ -111,7 +111,7 @@ def test_that_signing_post_params_works_2
111111

112112
assert_equal 'POST', request.method
113113
assert_equal '/test', request.path
114-
assert_match /key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3[Dd]&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0/, request.body.split("&").sort.join("&")
114+
assert_match(/key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3[Dd]&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0/, request.body.split("&").sort.join("&"))
115115
assert_equal nil, request['authorization']
116116
end
117117

test/units/test_cli.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ def test_parse
4646
def test_help_empty
4747
out = run_command
4848

49-
assert_match /Usage: /, out
49+
assert_match(/Usage: /, out)
5050
end
5151

5252
def test_help
5353
out = run_command(%w[help])
5454

55-
assert_match /Usage: /, out
55+
assert_match(/Usage: /, out)
5656
end
5757

5858
def test_version

test/units/test_consumer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_initializer
4141
assert_nil @consumer.debug_output
4242
end
4343

44-
def test_defaults
44+
def test_defaults
4545
@consumer=OAuth::Consumer.new(
4646
"key",
4747
"secret",

test/units/test_net_http_client.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_that_using_auth_headers_on_get_requests_works
1919
assert_equal 'GET', request.method
2020
assert_equal '/test?key=value', request.path
2121
correct_sorted_params = "oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"1oO2izFav1GP4kEH2EskwXkCRFg%3D\", oauth_version=\"1.0\""
22-
auth_intro, auth_params = request['authorization'].split(' ', 2)
22+
auth_intro = request['authorization'].split(' ', 2).first
2323
assert_equal auth_intro, 'OAuth'
2424
assert_matching_headers correct_sorted_params, request['authorization']
2525
end
@@ -129,7 +129,7 @@ def test_that_using_post_params_works
129129

130130
assert_equal 'POST', request.method
131131
assert_equal '/test', request.path
132-
assert_match /key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3[Dd]&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0/, request.body.split("&").sort.join("&")
132+
assert_match(/key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3[Dd]&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0/, request.body.split("&").sort.join("&"))
133133
assert_equal nil, request['authorization']
134134
end
135135

@@ -152,7 +152,7 @@ def test_that_using_post_body_works
152152

153153
assert_equal 'POST', request.method
154154
assert_equal '/test', request.path
155-
assert_match /OAuth oauth_consumer_key="consumer_key_86cad9", oauth_nonce="225579211881198842005988698334675835446", oauth_signature="%2[fF]DMMBOJzQ6JmEaXlAXDLGtD1z2I%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1199645624", oauth_token="token_411a7f", oauth_version="1.0"/, request['authorization'].split("&").sort.join("&")
155+
assert_match(/OAuth oauth_consumer_key="consumer_key_86cad9", oauth_nonce="225579211881198842005988698334675835446", oauth_signature="%2[fF]DMMBOJzQ6JmEaXlAXDLGtD1z2I%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1199645624", oauth_token="token_411a7f", oauth_version="1.0"/, request['authorization'].split("&").sort.join("&"))
156156
# assert_equal nil, request['authorization']
157157
end
158158

test/units/test_typhoeus_request_proxy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_that_proxy_simple_put_request_works_with_form_data
6161
assert_equal 'PUT', request_proxy.method
6262
end
6363

64-
def test_that_proxy_simple_put_request_works_with_arguments
64+
def test_that_proxy_simple_patch_request_works_with_arguments
6565
request = Typhoeus::Request.new('/test', :method => :patch)
6666
params = {'key' => 'value'}
6767
request_proxy = OAuth::RequestProxy.proxy(request, {:uri => 'http://example.com/test', :parameters => params})
@@ -72,7 +72,7 @@ def test_that_proxy_simple_put_request_works_with_arguments
7272
assert_equal 'PATCH', request_proxy.method
7373
end
7474

75-
def test_that_proxy_simple_put_request_works_with_form_data
75+
def test_that_proxy_simple_patch_request_works_with_form_data
7676
request = Typhoeus::Request.new('/test', :method => :patch, :params => {'key' => 'value'})
7777
request_proxy = OAuth::RequestProxy.proxy(request, {:uri => 'http://example.com/test'})
7878

0 commit comments

Comments
 (0)