Skip to content

Instantly share code, notes, and snippets.

@benaskins
Created April 9, 2009 02:14
Show Gist options
  • Save benaskins/92188 to your computer and use it in GitHub Desktop.
Save benaskins/92188 to your computer and use it in GitHub Desktop.
Scenario: Visit the local conditions page for a location where conditions are available
Given I have a demonstration site
And the web service knows about "Sydney, NSW"
When I visit "/weather/local-conditions/nsw/sydney"
Then I should see "Sydney current conditions"
And I should see "Dew point" defined as "18.7"
And I should see "Relative humidity" defined as "78"
And I should see "feels like" defined as "22.7"
And I should see "Wind" defined as "SE 5"
And I should see "Rainfall since 9am" defined as "0.0"
Then /^I should see "([^\"]*)" defined as "([^\"]*)"$/ do |label, value|
response.body.should =~ /<dt>#{label}<\/dt>\s*<dd>#{value}(.*)?<\/dd>/
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment