vendor/spec/webrat/lib/webrat/core/page.rb
def save_and_open
      return unless File.exist?(session.saved_page_dir)

      filename = "#{session.saved_page_dir}/webrat-#{Time.now.to_i}.html"
      
      File.open(filename, "w") do |f|
        f.write rewrite_css_and_image_references(session.response_body)
      end

      open_in_browser(filename)
    end
# Saves the page out to RAILS_ROOT/tmp/ and opens it in the default
# web browser if on OS X. Useful for debugging.
# 
# Example:
#   save_and_open
Saves the page out to RAILS_ROOT/tmp/ and opens it in the default
web browser if on OS X. Useful for debugging.


Saves the page out to RAILS_ROOT / tmp / and opens it in the default web browser if on OS X . Useful for debugging .
def save_and_open
      return unless File.exist?(session.saved_page_dir)
      filename = "#{session.saved_page_dir}/webrat-#{Time.now.to_i}.html"
      File.open(filename, "w") do |f|
        f.write rewrite_css_and_image_references(session.response_body)
      end
      open_in_browser(filename)
    end
def save_and_open return unless File . exist? ( session . saved_page_dir ) filename = "#{session.saved_page_dir}/webrat-#{Time.now.to_i}.html" File . open ( filename , "w" ) do | f | f . write rewrite_css_and_image_references ( session . response_body ) end open_in_browser ( filename ) end
Saves the page out to RAILS_ROOT/tmp/ and opens it in the default
web browser if on OS X.
Saves the page out to RAILS_ROOT / tmp / and opens it in the default web browser if on OS X .