On Wednesday, April 18, 2012 at 11:30 PM, Patrick J. Collins wrote:
> On Wed, 18 Apr 2012, David Chelimsky wrote:
> > If you're using capybara you could put save_and_open_page in an after hook. 
> > You'd still get the console output, but at least you'd see
> > the page in a browser.
> > 
> 
> 
> Is there a way to make that happen only upon failures during integration
> tests?
> 
> 

Try this:

RSpec.configure do |c|
  c.after(:each, :type => :request) do
    save_and_open_page if example.exception
  end
end
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to