Skip to content

Commit

Permalink
Yet another attempt to sort out dreaded "IOError - not opened for rea…
Browse files Browse the repository at this point in the history
…ding:"
  • Loading branch information
artemave committed Oct 20, 2011
1 parent 33aa1ce commit 6accb98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/rest-assured/routes/response.rb
Expand Up @@ -5,7 +5,7 @@ def self.perform(app)
if d = Double.where(:fullpath => request.fullpath, :active => true, :verb => request.request_method).first if d = Double.where(:fullpath => request.fullpath, :active => true, :verb => request.request_method).first
request.body.rewind request.body.rewind
body = request.body.read #without temp variable ':body = > body' is always nil. mistery body = request.body.read #without temp variable ':body = > body' is always nil. mistery
env = request.env.except('rack.input', 'rack.errors') env = request.env.except('rack.input', 'rack.errors', 'rack.logger')


d.requests.create!(:rack_env => env.to_json, :body => body, :params => request.params.to_json) d.requests.create!(:rack_env => env.to_json, :body => body, :params => request.params.to_json)


Expand Down
2 changes: 1 addition & 1 deletion lib/rest-assured/version.rb
@@ -1,3 +1,3 @@
module RestAssured module RestAssured
VERSION = '0.2.0.rc3' VERSION = '0.2.0.rc4'
end end
2 changes: 1 addition & 1 deletion spec/functional/response_spec.rb
Expand Up @@ -59,7 +59,7 @@
requests = double.as_null_object requests = double.as_null_object
Double.stub_chain('where.first').and_return(double(:requests => requests).as_null_object) Double.stub_chain('where.first').and_return(double(:requests => requests).as_null_object)


env.should_receive(:except).with('rack.input', 'rack.errors') env.should_receive(:except).with('rack.input', 'rack.errors', 'rack.logger')


Response.perform(rest_assured_app) Response.perform(rest_assured_app)
end end
Expand Down

0 comments on commit 6accb98

Please sign in to comment.