[rspec-devel] New Gem: spec/ui

aslak hellesoy aslak.hellesoy at gmail.com
Tue Jan 2 00:47:14 EST 2007

On 12/27/06, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> Hi all,
> A few weeks ago I blogged about how to get pretty RSpec/Watir HTML
> reports with screenshots
> (http://blog.aslakhellesoy.com/articles/2006/12/02/getting-screenshots-from-watir).
> I have taken the code and wrapped it up as a gem (still unreleased).
> If you check out the trunk you'll find it under spec_ui.
> There isn't a lot of documentation, but there are two examples in
> there, one for Watir/Safariwatir and one for Selenium-RC.
> I'd appreciate some feedback on this - I'd like to make this gem part
> of the next release.

I have added a new Rake task to spec/rails:


This task will run specs under spec/watir and generate HTML reports
with screenshots in doc/spec/watir. (If you're on Windows you need
RMagick and win32screenshot installed).

Specs in the spec/watir directory will have to follow a certain style,
and there is an example checked in under spec/watir/person_spec.rb.

I'm planning to add generator support for this such that the (new)
rspec_resource generator will also generate a skeleton watir spec.

A couple of things need more work:

1) Make this work with fixtures. This will require some work in
spec/ui's webapp_helper.rb - it uses inherit, which conflicts with
spec/rails, which also uses inherit. We can't inherit from both
Test::Unit::TestCase and Spec::Ui::WebappHelper.

2) Create spec:selenium and spec:selenium_server tasks in a selenium.rake file


> Aslak

More information about the rspec-devel mailing list