-
-
Save thecatwasnot/1266510 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 file: | |
Feature: Cucumber Question | |
Scenario Outline: Google Search for <search term> | |
Given I am on Google Search Home Page | |
When I search for <search term> | |
Then I should find <search term> | |
Examples: | |
|search term| | |
|Facebook| | |
|Delicious| | |
step definitions: | |
Given /^I am on Google Search Home Page$/ do | |
@site.browser.title == "Google" | |
end | |
When /^I search for <search term>$/ do |search_term| | |
@site.google_search.set(search_term) | |
end | |
Then /^I should find <search term>$/ do |search_term| | |
@site.google_search_page.text.include?(search_term) | |
@site.browser.close | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment