Merging again

This commit is contained in:
momoko saunders
2014-07-18 19:33:42 -07:00
parent 21ec7bb82a
commit 65d4603093
6 changed files with 474 additions and 5 deletions
+9
View File
@@ -0,0 +1,9 @@
Feature: Landing Page
As a person interested in bikebike
I want to find out about the current bikebike
In order to attend the conference
Scenario: Read landing page content
Given I am on the landing page
Then I can read about the current bikebike
And I can register for the conference
@@ -0,0 +1,13 @@
Given(/^I am on the (.+) page$/) do |page_name|
visit path_to(page_name)
end
Then(/^I can read about the current bikebike$/) do
within('#conference-name') { expect(page).to have_text 'Bike!Bike!' }
within('#conference-location') { expect(page).to have_text 'Columbus, Ohio' }
within('#conference-date') { expect(page).to have_text 'August 30 - September 1' }
end
Then(/^I can register for the conference$/) do
expect(page).to have_link 'Register'
end
+18
View File
@@ -0,0 +1,18 @@
module NavigationHelpers
def path_to(page_name)
case page_name
when /^landing$/i
path = 'root'
end
begin
self.send((path + '_url').to_sym)
rescue Object => e
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
"#{path}_url\n" +
"Now, go and add a mapping in #{__FILE__}"
end
end
end
World(NavigationHelpers)