Permalink
Browse files

add first feature

  • Loading branch information...
1 parent 525b7be commit 8d2f426400f4e4f8b2c7fdc2aa2f04123af2565b @afa committed Jul 21, 2010
@@ -0,0 +1,22 @@
+Feature: Manage startup_accessing_sites
+ In order to [goal]
+ [stakeholder]
+ wants [behaviour]
+
+ Scenario: Register new startup_accessing_site
+ Given I am on the new startup_accessing_site page
+ And I press "Create"
+
+ Scenario: Delete startup_accessing_site
+ Given the following startup_accessing_sites:
+ ||
+ ||
+ ||
+ ||
+ ||
+ When I delete the 3rd startup_accessing_site
+ Then I should see the following startup_accessing_sites:
+ ||
+ ||
+ ||
+ ||
@@ -0,0 +1,14 @@
+Given /^the following startup_accessing_sites:$/ do |startup_accessing_sites|
+ StartupAccessingSite.create!(startup_accessing_sites.hashes)
+end
+
+When /^I delete the (\d+)(?:st|nd|rd|th) startup_accessing_site$/ do |pos|
+ visit startup_accessing_sites_path
+ within("table tr:nth-child(#{pos.to_i+1})") do
+ click_link "Destroy"
+ end
+end
+
+Then /^I should see the following startup_accessing_sites:$/ do |expected_startup_accessing_sites_table|
+ expected_startup_accessing_sites_table.diff!(tableish('table tr', 'td,th'))
+end
@@ -10,6 +10,15 @@ def path_to(page_name)
when /the home\s?page/
'/'
+ when /the new startup_accessing_site page/
+ new_startup_accessing_site_path
+
+ when /the new startup accessing site page/
+ new_startup accessing site_path
+
+ when /the new startup accessing site page/
+ new_startup accessing site_path
+
# Add more mappings here.
# Here is an example that pulls values out of the Regexp:

0 comments on commit 8d2f426

Please sign in to comment.