Is there a reason that you are using import instead of require? I can't find any documentation on import to back up my memory, but I thought that require keeps track so that it can ignore if you require the same thing twice, but that import does not try to keep you from importing the same thing twice. I would recommend changing import to require and see what happens.
/\/\ark _____ From: rspec-users-boun...@rubyforge.org [mailto:rspec-users-boun...@rubyforge.org] On Behalf Of John Goodsen Sent: Friday, April 10, 2009 10:29 AM To: rspec-users@rubyforge.org Subject: [rspec-users] [cucumber,jruby] Same steps are being added multiple times? so I'm still stumped... how do I tell keep cucumber from loading the *SAME* steps more than once when I run multiple scenarios? I can't be the only person to experience this... I must be doing something wrong. I'm loading step classes in my env.rb file. When I add steps in cucumber/jruby using the register_steps() method, my test is acting like the step classes is getting added again for each scenario? thanks for any help, John On Thu, Apr 9, 2009 at 2:19 PM, John Goodsen <jgood...@radsoft.com> wrote: 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 jgood...@radsoft.com Lean/Agile/XP/Scrum Coaching and Training http://www.radsoft.com Ruby on Rails and Java Solutions -- John Goodsen RADSoft / Better Software Faster jgood...@radsoft.com Lean/Agile/XP/Scrum Coaching and Training http://www.radsoft.com Ruby on Rails and Java Solutions __________ Information from ESET NOD32 Antivirus, version of virus signature database 3999 (20090410) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users