Sha256: 07955c8cb2701548bcf1c6ed7c6b230fc7471f4b5fece2bf77667bc73dc35f18

Contents?: true

Size: 1.15 KB

Versions: 7

Compression:

Stored size: 1.15 KB

Contents

require 'spec_helper'

describe "LayoutLinks" do

  it "should have a Home page at '/'" do
    get '/'
    response.should have_selector('title', :content => "Home")
  end

  it "should have a Contact page at '/contact'" do
    get '/contact'
    response.should have_selector('title', :content => "Contact")
  end

  it "should have an About page at '/about'" do
    get '/about'
    response.should have_selector('title', :content => "About")
  end

  it "should have a Help page at '/help'" do
    get '/help'
    response.should have_selector('title', :content => "Help")
  end

  it "should have a signup page at '/signup'" do
    get '/signup'
    response.should be_success
  end

  it "should have the right links on the layout" do
    visit root_path
    click_link "About"
    response.should have_selector('title', :content => "About")
    click_link "Help"
    response.should have_selector('title', :content => "Help")
    click_link "Contact"
    response.should have_selector('title', :content => "Contact")
    click_link "Home"
    response.should have_selector('title', :content => "Home")
    click_link "Sign up now!"
    response.should be_success
  end

end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
tft_rails_dbc-0.1.3 lib/generators/chapter07/begin/templates/spec/requests/layout_links_07_spec.rb
tft_rails_dbc-0.1.1 lib/generators/chapter07/begin/templates/spec/requests/layout_links_07_spec.rb
tft_rails_dbc-0.1 lib/generators/chapter07/begin/templates/spec/requests/layout_links_07_spec.rb
tft_rails-0.6.2 lib/generators/chapter07/begin/templates/spec/requests/layout_links_07_spec.rb
tft_rails-0.6.1 lib/generators/chapter07/begin/templates/spec/requests/layout_links_07_spec.rb
tft_rails-0.6.0 lib/generators/chapter07/begin/templates/spec/requests/layout_links_07_spec.rb
tft_rails-0.5.1 lib/generators/chapter07/begin/templates/spec/requests/layout_links_07_spec.rb