Bugs item #13461, was opened at 2007-08-28 11: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.
----------------------------------------------------------------------
Comment By: Chad Humphries (spicycode)
Date: 2007-11-18 23:17
Message:
Moved to http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/63-13461-spec_ui-screenshotformatter-selenium-examples-don-t-work#ticket-63-2
----------------------------------------------------------------------
Comment By: Jean-Michel Garnier (garnierjm)
Date: 2007-08-29 13:23
Message:
Sorry AslaK, with a k.
Please ignore the first patch, I had made a stupid mistake :-(
Reading at the code it doesn't look very simple, why not
replacing the initialization by a simple call or by a
default value (with documentation) so it's transparent for
the user
----------------------------------------------------------------------
Comment By: Jean-Michel Garnier (garnierjm)
Date: 2007-08-29 11:51
Message:
Sorry Asla, I did read the instructions
(http://rspec.rubyforge.org/community/contribute.html) but I
forgot the checkbox ;-)
I am going to submit a couple of patch for spec_ui selenium
today.
----------------------------------------------------------------------
Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2007-08-28 15:14
Message:
Where's the patch? Don't forget to check the checkbox. For the future, please submit patches against the patches tracker - we keep a closer eye on that than bugs.
----------------------------------------------------------------------
Comment By: Jean-Michel Garnier (garnierjm)
Date: 2007-08-28 11:56
Message:
The patch is the for
/spec_ui/examples/selenium/spec/selenium/../spec_helper.rb
and has been generated with netbeans
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=13461&group_id=797