Creates some extra handy webrat steps
After you’ve run script/generate cucumber, do this:script/generate extra_webrat_steps
What does it do?
Currently, it just creates dom scoped versions of the ‘When’ steps.
So, if you have a page with lots of similar looking text, you can use steps like
The generator parses your current webrat_steps.rb to create the steps, so if that file changes
you might want to re-run the generator
Enhancement to support multiple languages
Since Cucumber supports multiple languages, webrat_extra_steps should do so as well. (The
currently supported languages are in rails_generators/extra_webrat_steps/tenplates/languages.yml)
It’s assumed that the features directory looks as follows:features/ +— [language]/ (any language cucumber supports) +— step_definitions/ +— *_steps.rb +— webrat_steps.rb +— *.feature +— [language]/ (multiple languages are supported) +— * +— support/ +— env.rb
Use script/generate extra_webrat_steps [language] to generate webrat_extra_steps.rb.
If no [language] is given, the generator works as usual.
Author Ian White