Webrat visits fails, but works in browser

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 B.
Cobalt Edge LLC
http://cobaltedge.com

On 25 jul 2008, at 10:11, Christopher B. wrote:

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:

Just look in yout log/test.log. That usually has a lot more info than
the output from webrat.

good luck,
bartz

Ok, thanks. I have figured it out of course by now :slight_smile: It was an
issue with RedCloth.

On Fri, Jul 25, 2008 at 5:56 AM, Bart Z. [email protected]
wrote:


Christopher B.
Cobalt Edge LLC
http://cobaltedge.com