r***@gmail.com
2018-02-07 12:43:32 UTC
I have used cucumber to write tests for three similar sites. The tests live
in seperate directories, each of which contain a feature directory.
Now the test work, it is time to refactor.
When I compare the step definition files in the feature/step_definition
directories, I can see a lot of steps that are repeated in the three step
definition files.
I have moved them to a file 'shared_steps.rb' in those directories, but now
I have three identical shared_step.rb files.
Then I have moved the shared_steps.rb files to a newly created feature/lib
directory. The shared steps are automatically used by cucumber. But I can
not symlink that lib-directory from the first site to the other two sites:
cucumber does not include those. I tried another approach: making lib a
normal directory containing symlinks to the shared file. This works, but
this approach forces my to symlink each file I want to reuse.
What is the best approach to reuse code within the steps_definition and
support directory?
thanks in advance, Ruud
in seperate directories, each of which contain a feature directory.
Now the test work, it is time to refactor.
When I compare the step definition files in the feature/step_definition
directories, I can see a lot of steps that are repeated in the three step
definition files.
I have moved them to a file 'shared_steps.rb' in those directories, but now
I have three identical shared_step.rb files.
Then I have moved the shared_steps.rb files to a newly created feature/lib
directory. The shared steps are automatically used by cucumber. But I can
not symlink that lib-directory from the first site to the other two sites:
cucumber does not include those. I tried another approach: making lib a
normal directory containing symlinks to the shared file. This works, but
this approach forces my to symlink each file I want to reuse.
What is the best approach to reuse code within the steps_definition and
support directory?
thanks in advance, Ruud
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.