[rspec-users] Appropriate adapter (Rails, Cucumber)
joe at josephwilk.net
Mon Apr 20 05:50:44 EDT 2009
Julian Leviston wrote:
> Hi All,
> I've got a bunch of tests written in cucumber, and they're all
> lovely... this is rails testing i'm doing by the way.... and now I'm
> decided to plug in selenium... my issue is, I'd like to select which
> adapter to use on a per-scenario basis... is there any easy way to do
> this, and yet still maintain the no-implementation-details in the
> cucumber side type of thing that cucumber encourages...
> I mean, basically, I just want it to use the fastest method
> possible.... so for non-ajax/non-js stuff, I'd like it to use the
> default adapter and others I'd like it to use selenium....
> rspec-users mailing list
> rspec-users at rubyforge.org
Have you looked at using Cucumber's Tagging feature?
#Run scenarios excluding any that are tagged as js
> cucumber --tags ~@js features/
#Run just the js scenarios.
> cucumber --tags @js features/
So you have two separate runs of Cucumber. Hence you could have a env.rb
for each. One that loads Selenium (or Webrat driving Selenium) and the
More information about the rspec-users