Ruby on Rails Thursday, August 30, 2012

On 30 August 2012 22:29, 7stud -- <lists@ruby-forum.com> wrote:
> The rspec test looks like this:
>
>
> require 'spec_helper'
>
> describe "Static pages" do
>
> describe "Home page" do
>
> it "should have the h1 'Sample App'" do
> visit '/static_pages/home'
> page.should have_selector('h1', :text => 'Sample App')
> end
>
> end
>
> end
>
>
> My controller looks like this:
>
> class StaticPagesController < ApplicationController
> end

If you go to that url in the browser does it show a page with the header?

Is there a page in public/static_pages that matches that url? In
which case that will be served without the need for a controller
action.

What does test.log show when you run the test?

Colin

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
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 https://groups.google.com/groups/opt_out.

No comments:

Post a Comment