Ruby on Rails
Wednesday, May 30, 2012
I'd suggest you post the error itself. From what I can see it could be that you need to edit the step definition from "visit root" to "visit root_path".
On Tuesday, May 29, 2012 2:58:48 PM UTC+1, Ruby-Forum.com User wrote:
i whant to test that i have a homepage and that it says Welcome on it.
i am using Cucumber to make this happen
File:features/public_pages.feature
Feature: Public pages
Scenario Outline: Visit public pages
When I go to <Page>
Then i should see "<Page Title>"
Examples: List of pages and there titles
| Page | Page Title |
| Home Page | Welcome |
| About Page | About |
| Contact Page | Contact |
step_definitions
When /^I go to Home Page$/ do
visit root
#pending # express the regexp above with the code you wish you had
end
Then /^i should see "(.*?)"$/ do |text|
page.should have_content(text)
end
i have the text on the hope page but it still shows up as a error
--
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/99rLfbvOlQYJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment