Spec helper for writing the last response to a file

This commit is contained in:
galfert 2012-10-22 12:18:31 +02:00
parent 34f6254117
commit ba979dfe04

View File

@ -16,7 +16,6 @@ riak_config = YAML.load(config)[ENV['RACK_ENV']]['riak'].symbolize_keys
set :riak_config, riak_config
::Riak.disable_list_keys_warnings = true
::Riak.url_decoding = true
def app
LiquorCabinet
@ -49,4 +48,10 @@ def wait_a_second
while Time.now.to_i == now; end
end
def write_last_response_to_file(filename = "last_response.html")
File.open(filename, "w") do |f|
f.write last_response.body
end
end
alias context describe