Skip to content

Commit

Permalink
Refactored so that our form_validations feature makes use of our new …
Browse files Browse the repository at this point in the history
…helper
  • Loading branch information
baphled committed Jul 16, 2010
1 parent 7f3366c commit f9297cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 1 addition & 3 deletions features/plain/form_validations.feature
Expand Up @@ -42,9 +42,7 @@ Feature: Validation of forms
Scenario: A project must be unique
Given I can view the projects page
When I click new projects
And we fill in the project title with 'A fixture project'
And we fill in the project aim with 'A description for our project'
And we fill in the project description with 'A projects aims'
And I fill in the project form with duplicate data
Then submit the form
And the project information should not be saved
And the error message should be "has already been taken"
Expand Down
8 changes: 8 additions & 0 deletions features/step_definitions/form_steps.rb
Expand Up @@ -32,4 +32,12 @@
end

When /^I update the ([^\"]*) form$/ do |model|
end

When /^I fill in the ([^\"]*) form ([^\"]*) with "([^\"]*)"$/ do |model, property, value|
fill_form model.singularize, property.to_sym => "#{value}"
end

When /^I fill in the ([^\"]*) form with duplicate data$/ do |model|
fill_in_form_with_duplicate_data model
end

0 comments on commit f9297cf

Please sign in to comment.