[rspec-devel] [ rspec-Bugs-13461 ] spec_ui ScreenshotFormatter selenium examples don't work

noreply at rubyforge.org noreply at rubyforge.org
Tue Aug 28 11:34:30 EDT 2007


Bugs item #13461, was opened at 2007-08-28 17:34
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=13461&group_id=797

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Jean-Michel Garnier (garnierjm)
Assigned to: Nobody (None)
Summary: spec_ui ScreenshotFormatter selenium examples don't work

Initial Comment:
The selenium examples in rspec/spec_ui/examples/selenium/spec/selenium/find_rspecs_homepage_spec.rb
don't work anymore since the upgrade to 1.0.8

Stacktrace:

NoMethodError in 'Google's search page I should find rspec's home page when I search for rspec'
undefined method `take_screenshot_of' for nil:NilClass
/spec_ui/examples/selenium/spec/selenium/../spec_helper.rb:21:
/spec_ui/examples/selenium/spec/selenium/find_rspecs_homepage_spec.rb:18:

This is due to the fact that Spec::Ui::ScreenshotFormatter is now a Singleton and should be initialized.

I have attached a patch which adds the initialization of Spec::Ui::ScreenshotFormatter:

Spec::Ui::ScreenshotFormatter.new(File.dirname(__FILE__) + '/../specs.html')

 in the before :all of spec_helper because it seemed like a logical place.

Since this bug happens in the examples, I haven't written any spec. However, I can write some if necessary.

I am not using Watir since I am on Ubuntu but I guess there is the same problem.

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

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


More information about the rspec-devel mailing list