Sunday, 25 August 2013

Why Am I Getting These Failures in RSpec?

Why Am I Getting These Failures in RSpec?

Getting the following errors when I run 'bundle exec rspec
spec/requests/static_pages_spec.rb:
'9 examples, 2 failures
Failed examples:
rspec ./spec/requests/static_pages_spec.rb:56 # Static pages Contact page
should have the title 'Contact page'
rspec ./spec/requests/static_pages_spec.rb:51 # Static pages Contact page
should have the content 'Contact page''
I can't figure out how to get the two tests to pass here.
Trying to get through the tutorial here, learning, very new (I believe
this is the code):
'describe "Contact page" do
it "should have the content 'Contact'" do
visit '/static_pages/contact'
expect(page).to have_content('Contact')
end
it "should have the title 'Contact'" do
visit '/static_pages/contact'
expect(page).to have_title("Ruby on Rails Tutorial Sample App |
Contact")
end
end
end'

No comments:

Post a Comment