Webmock: EOFError

Created on 11 Aug 2010  ·  3Comments  ·  Source: bblimke/webmock

Using WebMock with Test/Unit and em-http-request, I get this error:

EOFError: end of file reached
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/webmock-1.3.4/lib/webmock/response.rb:117:in `read_raw_response'
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/webmock-1.3.4/lib/webmock/response.rb:21:in `initialize'
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/webmock-1.3.4/lib/webmock/response.rb:13:in `new'
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/webmock-1.3.4/lib/webmock/response.rb:13:in `response_for'
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/webmock-1.3.4/lib/webmock/request_stub.rb:21:in `block in to_return'
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/webmock-1.3.4/lib/webmock/request_stub.rb:21:in `map'
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/webmock-1.3.4/lib/webmock/request_stub.rb:21:in `to_return'
test/test_changes.rb:97:in `block (2 levels) in <class:TestCouchChanges>'
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/eventmachine-0.12.11/lib/eventmachine.rb:195:in `call'
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/eventmachine-0.12.11/lib/eventmachine.rb:195:in `run_machine'
/Users/harry/.rvm/gems/ruby-1.9.1-p378/gems/eventmachine-0.12.11/lib/eventmachine.rb:195:in `run'
test/test_changes.rb:93:in `block in <class:TestCouchChanges>'

Most helpful comment

For anyone who jumps to web search as quickly as me:

This can be caused by you having written .to_return("abc") instead of .to_return(body: "abc").

All 3 comments

Can you provide more details or failing test?

Didn't get any feedback so I assume the problem is gone.

For anyone who jumps to web search as quickly as me:

This can be caused by you having written .to_return("abc") instead of .to_return(body: "abc").

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Morred picture Morred  ·  14Comments

wgordon17 picture wgordon17  ·  5Comments

j-mcnally picture j-mcnally  ·  7Comments

Integralist picture Integralist  ·  5Comments

RKushnir picture RKushnir  ·  14Comments