跳至內容 跳至搜尋
名稱空間
方法
S

實體公共方法

save_and_open_page(path = html_dump_default_path)

將回應主體的內容儲存至檔案,並嘗試在瀏覽器中開啟。若要自動開啟網頁,您的 Gemfile 中必須有 Launchy。

# 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