[rspec-users] Webrat visits fails, but works in browser

Christopher Bailey chris at cobaltedge.com
Fri Jul 25 04:11:52 EDT 2008


I'm wondering if folks have suggestions for how I can debug the
following problem.  I have some RSpec Stories that use WebRat, and do
a "visits hotels_path" type of  thing.  It is failing, yet the page
works fine in the browser.  I'm trying to figure out how to go about
looking into why Webrat fails.  The error it puts out looks like:

FAILURES:
    1) Add and edit hotels (View all hotels) FAILED
    RuntimeError: Page load was not successful (Code: 0)
    /Users/chris/Code/project/vendor/plugins/webrat/lib/webrat/core/page.rb:298:in
`flunk'
/Users/chris/Code/project/vendor/plugins/webrat/lib/webrat/core/page.rb:268:in
`request_page'
/Users/chris/Code/project/vendor/plugins/webrat/lib/webrat/core/page.rb:223:in
`load_page'
/Users/chris/Code/project/vendor/plugins/webrat/lib/webrat/core/page.rb:19:in
`initialize'
/Users/chris/Code/project/vendor/plugins/webrat/lib/webrat/rails/session.rb:15:in
`new'
/Users/chris/Code/project/vendor/plugins/webrat/lib/webrat/rails/session.rb:15:in
`visits'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/integration.rb:501:in
`send!'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/integration.rb:501:in
`method_missing'
/Users/chris/Code/project/stories/steps/hotel_steps.rb:37:in `view all hotels'
stories/all.rb:2

I'm using the very latest webrat (was also using a version from
several weeks ago and this happened too, so I updated to see if that
made a difference).  Any suggestions welcome, thanks.

-- 
Christopher Bailey
Cobalt Edge LLC
http://cobaltedge.com


More information about the rspec-users mailing list