Skip to content
Browse files

working cucumber example

  • Loading branch information...
1 parent 71b84ea commit adb022fba808897cee3abffd6d972d0a94cc7a1f @robert-stuttaford committed Jan 10, 2012
Showing with 6 additions and 11 deletions.
  1. +3 −4 features/app.feature
  2. +3 −7 features/step_definitions/basic_steps.rb
View
7 features/app.feature
@@ -2,8 +2,7 @@
Feature: Start Feature
Background:
- When I visit the app
- Scenario: Open the Chooser from the Start page
- When I click the "Choose a Cog" button
- Then I should see the "chooser" overlay
+ Scenario: See the widget
+ When I visit the app
+ Then I should see "A Widget."
View
10 features/step_definitions/basic_steps.rb
@@ -1,11 +1,7 @@
When /^I visit the app$/ do
- visit '/production'
+ visit '/dev'
end
-When /^I click the "([^"]*)" button$/ do |name|
- click_button(name)
-end
-
-Then /^I should see the "([^"]*)" overlay$/ do |overlay|
- page.should have_selector('div#overlay>div.'+overlay)
+Then /^I should see "(.*)\."$/ do |text|
+ page.has_content? text
end

0 comments on commit adb022f

Please sign in to comment.
Something went wrong with that request. Please try again.