[rspec-users] [cucumber, jruby] Same steps are being added multiple times?

John Goodsen jgoodsen at radsoft.com
Thu Apr 9 14:19:59 EDT 2009


Hi all,

I'm not quite sure I understand how env.rb is loaded in the cucumber/jruby
world.  I have
a directory structure like this:

stories/fulfillment_status_tracking
stories/fulfillment_status_tracking/main_success.feature
stories/fulfillment_status_tracking/test.feature
stories/regular_billme_single_title_subscription
stories/regular_billme_single_title_subscription/form_validation.feature
stories/regular_billme_single_title_subscription/main_success.feature
stories/support
stories/support/env.rb


My env.rb file simply loads my Java step class and adds it, here's what it
looks like:

----------- env.rb -----------

require 'cucumber/java'
import 'com.timeinc.ecommerce.storytests.cucumber.NavigationSteps'

register_steps(NavigationSteps)
SeleniumController.markStepsLoaded()

-----------

but when I run my tests with:  jruby -S cucumber -r stories/support/env.rb

I am getting Ambiguous match of my steps - but I only have a single class of
steps, NavigationSteps.

any ideas what's going on?

-- 
John Goodsen                 RADSoft / Better Software Faster
jgoodsen at radsoft.com            Lean/Agile/XP/Scrum Coaching and Training
http://www.radsoft.com          Ruby on Rails and Java Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090409/e65b248c/attachment.html>


More information about the rspec-users mailing list