Show error page.
This commit is contained in:
parent
854d09a13e
commit
bbc826d8c5
@ -73,7 +73,7 @@ module Webrat
|
|||||||
end
|
end
|
||||||
|
|
||||||
save_and_open_page if exception_caught?
|
save_and_open_page if exception_caught?
|
||||||
flunk("Page load was not successful (Code: #{response_code.inspect})") unless success_code?
|
flunk("Page load was not successful (Code: #{response_code.inspect}):\n#{formatted_error}") unless success_code?
|
||||||
|
|
||||||
@scope = nil
|
@scope = nil
|
||||||
@current_url = url
|
@current_url = url
|
||||||
@ -141,6 +141,11 @@ module Webrat
|
|||||||
response_html.gsub(/"\/(stylesheets|images)/, doc_root + '/\1')
|
response_html.gsub(/"\/(stylesheets|images)/, doc_root + '/\1')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Subclasses can override this to show error messages without html
|
||||||
|
def formatted_error
|
||||||
|
response_body
|
||||||
|
end
|
||||||
|
|
||||||
def_delegators :current_scope, :fill_in, :fills_in
|
def_delegators :current_scope, :fill_in, :fills_in
|
||||||
def_delegators :current_scope, :check, :checks
|
def_delegators :current_scope, :check, :checks
|
||||||
def_delegators :current_scope, :uncheck, :unchecks
|
def_delegators :current_scope, :uncheck, :unchecks
|
||||||
|
Loading…
Reference in New Issue
Block a user