Skip to content

Commit

Permalink
Moved scenario to a more appropriate feature file
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Jun 18, 2010
1 parent c162b18 commit f0570e6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
13 changes: 4 additions & 9 deletions features/plain/form_validations.feature
Expand Up @@ -31,8 +31,9 @@ Feature: Validation of forms
| projects | project | too short | description | input | li#project_description_input | Please enter at least 12 characters. |
| projects | project | blah/ | location | input | li#project_location_input | Must be a valid project location on your system. |
| steps | step | | title | input | li#step_title_input | Please enter at least 12 characters. |
| stories | story | blah | scenario | input | li#story_scenario_input | Please enter at least 7 characters. |
| stories | story | blah | scenario | input | li#story_scenario_input | Please enter at least 7 characters. |

# Relies on fixtures
Scenario: A project must be unique
Given I can view the projects page
When I click new projects
Expand All @@ -43,6 +44,7 @@ Feature: Validation of forms
And the project information should not be saved
And the error message should be "has already been taken"

# Relies on fixtures
Scenario: A feature must be unique
Given I can view the features page
When I click new features
Expand All @@ -55,6 +57,7 @@ Feature: Validation of forms
And the feature information should be not saved
And the error message should be "has already been taken"

# Relies on fixtures
Scenario: If a story is not unique we need to display a error
Given I can view the stories page
When I use the "New Story" link
Expand All @@ -70,14 +73,6 @@ Feature: Validation of forms
Then the step should be not saved
And the message 'Title must start with Given, When or Then' should be displayed

Scenario: A story must start with 'Given' otherwise it does not validate
Given I can view the steps page
When I click new steps
And we fill in the step title with 'Given we have a new step'
Then submit the form
And the step should be saved as 'Given we have a new step'
And a flash message 'Step: Given we have a new step, was created' should be displayed

Scenario: A story invalid if it does not have 'When' as a prefix
Given I can view the steps page
When I click new steps
Expand Down
10 changes: 9 additions & 1 deletion features/plain/stories.feature
Expand Up @@ -49,4 +49,12 @@ Feature: Stories will be needed to populate our projects features
Scenario: If a scenario has examples we must be able to see them.
Given we have a stories with examples
When the story is viewed
Then we should the example should be displayed
Then we should the example should be displayed

Scenario: A story must start with 'Given' otherwise it does not validate
Given I can view the steps page
When I click new steps
And we fill in the step title with 'Given we have a new step'
Then submit the form
And the step should be saved as 'Given we have a new step'
And a flash message 'Step: Given we have a new step, was created' should be displayed

0 comments on commit f0570e6

Please sign in to comment.