Skip to content

Commit

Permalink
Define the last step in the "Viewing a list of tools used to prepare …
Browse files Browse the repository at this point in the history
…the recipe" scenario
  • Loading branch information
eee-c committed Apr 2, 2009
1 parent 0318121 commit bb5f193
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion features/recipe_details.feature
Expand Up @@ -23,7 +23,7 @@ Feature: Recipe Details

Given a recipe for Chicken Noodle Soup
When I view the recipe
Then I should see that it requires a bowl, a colander, a cutting board, a pot and a skimmer to prepare
Then I should see that it requires a Bowl, a Colander, a Cutting Board, a Pot and a Skimmer to prepare

Scenario: Main site categories

Expand Down
8 changes: 8 additions & 0 deletions features/step_definitions/recipe_details.rb
Expand Up @@ -114,3 +114,11 @@
response.should contain("Inactive Time: 5 hours")
end

Then /^I should see that it requires (.+) to prepare$/ do |tool_list|
tools = tool_list.
split(/\s*(,|and)\s*/).
reject{|str| str == "," || str == "and"}
tools.each do |tool|
response.should contain(tool.sub(/an? /, ''))
end
end

0 comments on commit bb5f193

Please sign in to comment.