Module: ActionDispatch::TestHelpers::PageDumpHelper

Included in:
IntegrationTest::Behavior
Defined in:
lib/action_dispatch/testing/test_helpers/page_dump_helper.rb

Defined Under Namespace

Classes: InvalidResponse

Instance Method Summary collapse

Instance Method Details

#save_and_open_page(path = html_dump_default_path) ⇒ Object

Saves the content of response body to a file and tries to open it in your browser. Launchy must be present in your Gemfile for the page to open automatically.



10
11
12
# File 'lib/action_dispatch/testing/test_helpers/page_dump_helper.rb', line 10

def save_and_open_page(path = html_dump_default_path)
  save_page(path).tap { |s_path| open_file(s_path) }
end