Permalink
Browse files

Add test ensuring input and label are present on the page

  • Loading branch information...
joshuaclayton committed Oct 7, 2009
1 parent bccb243 commit 08af8af54df0315df6db4b347df94e4bb838070e
Showing with 6 additions and 1 deletion.
  1. +1 −0 features/homepage_viewing.feature
  2. +5 −1 features/step_definitions/webrat_steps.rb
@@ -6,3 +6,4 @@ Feature: View the homepage
Scenario: View the homepage
When I go to the homepage
Then I should see "Peas"
+ And I should see a field labeled "Enter your long URL"
@@ -175,10 +175,14 @@
field_labeled(label).should_not be_checked
end
+Then /^I should see a field labeled "([^\"]*)"$/ do |label|
+ assert field_labeled(label)
+end
+
Then /^I should be on (.+)$/ do |page_name|
URI.parse(current_url).path.should == path_to(page_name)
end
Then /^show me the page$/ do
save_and_open_page
-end
+end

0 comments on commit 08af8af

Please sign in to comment.