Appropriate adapter (Rails, Cucumber)

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
coming to testing the javascript and AJAX parts of the app… and I’ve
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…

Julian.

Julian L. wrote:

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…

Julian.


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Have you looked at using Cucumber’s Tagging feature?
(http://wiki.github.com/aslakhellesoy/cucumber/tags)


@js
Scenario: I’m javascript

Scenario: I’m not using javascript


#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
other Webrat.

HTH,

Joseph W.