[rspec-users] opening a response in browser (webrat)

Zach Dennis zach.dennis at gmail.com
Mon Sep 1 14:32:20 EDT 2008

In the past I've done this...

   File.open(RAILS_ROOT + "/public/duh.html", "w"){ |f| f.puts response.body }

And then in terminal I go to my project root and type "open
public/duh.html". Although you may be able to get away with doing this
in your debugging session:

   system "open #{RAILS_ROOT}/public/duh.html"



On Mon, Sep 1, 2008 at 1:28 PM, Jonathan Linowes
<jonathan at parkerhill.com> wrote:
> Given I am running an rspec story
> And it uses webrat
> And I am using rdebug
> When I am at a breakpoint (eg after a 'visits' in a step)
> Then how can I open the current response in a browser to see what the page
> actually looks like at that point?
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

Zach Dennis

More information about the rspec-users mailing list