generator that parses your existing webrat steps to create some extra ones
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 3 commits ahead, 1 commit behind ianwhite:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
rails_generators/extra_webrat_steps
.gitignore
README.textile

README.textile

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
this:

When within: div.crumbs_bar, I press “Home” When within: form.enquiry, I select “Website” from “Enquiry type”

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.

Contributors

Author Ian White

Contributions by