From ba979dfe04c53745269eb78d30879a3263e16865 Mon Sep 17 00:00:00 2001 From: Garret Alfert Date: Mon, 22 Oct 2012 12:18:31 +0200 Subject: [PATCH] Spec helper for writing the last response to a file --- spec/spec_helper.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1e9a6b0..ac20b62 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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