跳至内容 跳至搜索
命名空间
方法
S

实例公共方法

save_and_open_page(path = html_dump_default_path)

将响应体的内容保存到文件并在浏览器中尝试打开它。Launchy 必须存在于您的 Gemfile 中,页面才能自动打开。

# File actionpack/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