[rspec-devel] [ rspec-Feature Requests-6651 ] Ability to query whether a spec has failed or not in teardown

noreply at rubyforge.org noreply at rubyforge.org
Tue Jan 30 19:05:13 EST 2007


Feature Requests item #6651, was opened at 2006-11-13 18:39
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6651&group_id=797

Category: None
Group: None
Status: Open
Priority: 3
Submitted By: Aslak Hellesøy (aslak_hellesoy)
Assigned to: Aslak Hellesøy (aslak_hellesoy)
Summary: Ability to query whether a spec has failed or not in teardown

Initial Comment:
I'm using RSpec to drive Watir. When a spec fails, I want to take a screenshot before closing the browser in teardown. (Screenshotting is supported by Watir). Example:

teardown do
  if failed?
    screenshot_file_name = "#{context_name} #{spec_name}.jpg".gsub!(/\s/, "_")
    screen_capture(screenshot, true)
  end
  @ie.close
end

3 new methods that need to be available in teardown:

failed?
context_name
spec_name


----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-01-31 00:05

Message:
Aslak - did this one got resolved w/ the addition of callbacks? If so, can we kill it?

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=6651&group_id=797


More information about the rspec-devel mailing list