Skip to content

Commit

Permalink
switch from link to uri
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Feb 7, 2014
1 parent ea74012 commit 1759340
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/mechanize/unsupported_scheme_error.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Mechanize::UnsupportedSchemeError < Mechanize::Error
attr_accessor :scheme, :link
attr_accessor :scheme, :uri

def initialize(scheme, link)
def initialize(scheme, uri)
@scheme = scheme
@link = link
@uri = uri
end
end
2 changes: 1 addition & 1 deletion test/test_mechanize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ def test_get_scheme_unsupported
@mech.get('ftp://server.com/foo.html')
rescue Mechanize::UnsupportedSchemeError => error
assert_equal 'ftp', error.scheme
assert_equal 'ftp://server.com/foo.html', error.link.to_s
assert_equal 'ftp://server.com/foo.html', error.uri.to_s
raise
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_mechanize_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_click_unsupported_scheme
link.click
rescue Mechanize::UnsupportedSchemeError => error
assert_equal 'javascript', error.scheme
assert_equal "javascript:new_page('1')", error.link.to_s
assert_equal "javascript:new_page('1')", error.uri.to_s
raise
end
end
Expand Down

0 comments on commit 1759340

Please sign in to comment.