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.
You can include -r feature into your cucumber.yml file such that cucumber loads all the step definitions in feature/ directory. Append above in std_opts. See appended cucumber.yml file below.
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: