Created
October 6, 2011 03:59
-
-
Save onthespotqa/1266476 to your computer and use it in GitHub Desktop.
cucumber examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feature: | |
Feature: Cucumber Question | |
Scenario Outline: Google Search for <search term> | |
Given I am on Google Search Home Page | |
When I search for "<Search>" | |
Then I should find "<Search>" | |
Examples: | |
| Search | | |
| Facebook | | |
| Delicious | | |
steps: | |
Before do | |
@site = Bookmarks.new | |
end | |
Given /^I am on Google Search Home Page$/ do | |
@site.google_search_page.title == "Google" | |
end | |
When /^I search for "([^"]*)"$/ do |arg1| | |
@site.google_search(arg1) | |
end | |
Then /^I should find "([^"]*)"$/ do |arg1| | |
@site.google_search_page.text.include?(arg1) | |
@site.browser.close | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment