views:

192

answers:

2

I have recently updated the Cucumber gems ('cucumber' and 'cucumber-rails') on my machine and have run into a couple of issues. The one i am currently fighting is that none of the defined steps for my features are being automatically loaded by Cucumber. This results in my command line telling me i "can implement step definitions for undefined steps with these snippets" for every single step i use in my features.

I have run:

cucumber --verbose

...and can see the following:

Code: * vendor/plugins/paperclip/cucumber/paperclip_steps.rb

However, none of the steps are being loaded in by Cucumber unless i specify files to load:

cucumber -r features/step_definitions/web_steps.rb

I thought this might just be the custom step files i had created within the "step_definitions" folder in my app structure but it would appear the standard "web_steps" file isnt being loaded either.

Would appreciate hearing from anyone who has come across this issue or knows why this might be happening.

Thanks.

A: 

OK i have come up with a solution for this for the time being. Im not sure if its the right one or not. Simple disabling profiles when running the cucumber command seems to ensure that the correct step definitions are loaded for the features.

I can now run my tests with:

cucumber --no-profile
zoltarSpeaks
A: 

I've never been able to get to the bottom of this, but you'll find that the default profile creates a file called something like 'rerun.txt' in your app's root directory. When this file is there it won't run all of the tests. I think it's to stop them being run when they didn't fail last time, probably something to do with running autotest.

I fixed it by editing my cucumber.yml file and commenting out the default profile stuff.

I believe that the default behaviour must be really useful because it wouldn't be there, but can't find it explained anywhere.

Ghoti