squirrel-cucumber 0.3.12 → 0.3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cucumber/webrat/mechanize_world.rb +4 -1
- metadata +1 -1
@@ -52,6 +52,8 @@ module WWW #:nodoc:
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
# Mechanize throws exceptions for certain HTTP status codes.
|
56
|
+
# We want to catch these and still create a page.
|
55
57
|
def fetch_page_with_secret_sauce(params)
|
56
58
|
begin
|
57
59
|
page = fetch_page_without_secret_sauce(params)
|
@@ -61,7 +63,8 @@ module WWW #:nodoc:
|
|
61
63
|
page.redirects ||= params[:redirects].to_i
|
62
64
|
page
|
63
65
|
end
|
64
|
-
|
66
|
+
alias_method :fetch_page_without_secret_sauce, :fetch_page
|
67
|
+
alias_method :fetch_page, :fetch_page_with_secret_sauce
|
65
68
|
end
|
66
69
|
end
|
67
70
|
|