I use integrated cucumber *.feature file recognition in IntelliJ Idea 10. I tried to use the cucumber plugin but that zombie stuff eats memory like crazy so I abandoned this idea.
The problem is that i have global step_definitions directory where i place all my steps files.
So my directory tree seems like
- features
- —— module 1
- ———— function 1
- ———— function 2
- ———— function 3
- ———— function N
- —— module 2
- ———— function 1
- ———— function 2
- ———— function 3
- ———— function N
- —— step_defenitions
- ———— module1_steps.rb
- ———— module2_steps.rb
- ———— module3_steps.rb
- ———— moduleN_steps.rb
- —— support
- ———— env.rb
- ———— hooks.rb
- lib
I made that for easy coding in one place.
When i run my test, all steps are visible for cucumber. It’s running, doing stuff i wrote.
But when I writing a code in *.feature file, Idea 10 cannot see defined global step definitions and show warnings after Given, When, Then, And etc. words.
Please help me how to tell Idea 10 that i dont need to include step_definitions folder inside every test folder (features/moduleN/functionN/step_definitions) and use that folder (features/step_definitions) instead.
I was trying to modify the project settings and couldn’t find any suitable option.
The problem was in the name of
step_defenitions, because it should bestep_definitions.Caution. Don’t do this at home. And of course, don’t try this at work 🙂