Skip to content

Commit

Permalink
Improve spec_helper_extensions::save_body to display file saved.
Browse files Browse the repository at this point in the history
  • Loading branch information
igal committed Sep 1, 2012
1 parent 608e8c0 commit 2502ad7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/spec_helper_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ def be_valid_xhtml_fragment
end

# Save the response.body to "/tmp/response.html", to aid manual debugging.
def save_body
filename = "/tmp/response.html"
def save_body(filename="/tmp/response.html")
bytes = File.open(filename, "w+"){|h| h.write(response.body)}
puts "# Saved response body to: #{filename}"
return [filename, bytes]
end

Expand Down

0 comments on commit 2502ad7

Please sign in to comment.