Topic: I have problem linking my application.html.erb to my home.html.erb
i have problem trying to get my home static page to work
the test unit give error when i tried to test for the "title" of my page.
the code in the "application.html.erb" goes like this
<title>Users Interactive | <%= yield(:title) %></title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= csrf_meta_tags %>
<%= yield %>
the home page goes like this:
<% provide(:title, 'Home') %>
This is my sample home page
the spec test goes like this:
it "should have the title 'Help'" do
:text => "Users Interactve | Home")
it give a failing report as:
1) Static pages Home page should have the title 'Home'
Failure/Error: page.should have_selector('title',
expected css "title" with text "Users Interactive | Home" to return something
# ./spec/requests/static_pages_spec.rb:15:in `block (3 levels) in <top (required)>'
Finished in 0.30253 seconds
6 examples, 1 failure
ANY SUGGESTION PLEASE
Last edited by dimonge (2012-03-19 07:04:40)