Sha256: e636afb1774cc9fc72028012937924ab06e997e92530f4a7ad4f461e0532c19e

Contents?: true

Size: 1.07 KB

Versions: 7

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

describe PagesController do
  render_views

  before(:each) do
    @base_title = 'Ruby on Rails Tutorial Sample App'
  end

  describe "GET 'home'" do
    it "should be successful" do
      get 'home'
      response.should be_success
    end
    
    it "should have the right title" do
      get 'home'
      response.should have_selector("title",
                                    :content => @base_title + " | Home")
    end
  end

  describe "GET 'contact'" do
    it "should be successful" do
      get 'contact'
      response.should be_success
    end

    it "should have the right title" do
      get 'contact'
      response.should have_selector("title",
                                    :content => @base_title + " | Contact")
    end
  end

  describe "GET 'about'" do
    it "should be successful" do
      get 'about'
      response.should be_success
    end

    it "should have the right title" do
      get 'about'
      response.should have_selector("title",
                                    :content => @base_title + " | About")
    end
  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/controllers/pages_controller_07_spec.rb
tft_rails_dbc-0.1.1 lib/generators/chapter07/begin/templates/spec/controllers/pages_controller_07_spec.rb
tft_rails_dbc-0.1 lib/generators/chapter07/begin/templates/spec/controllers/pages_controller_07_spec.rb
tft_rails-0.6.2 lib/generators/chapter07/begin/templates/spec/controllers/pages_controller_07_spec.rb
tft_rails-0.6.1 lib/generators/chapter07/begin/templates/spec/controllers/pages_controller_07_spec.rb
tft_rails-0.6.0 lib/generators/chapter07/begin/templates/spec/controllers/pages_controller_07_spec.rb
tft_rails-0.5.1 lib/generators/chapter07/begin/templates/spec/controllers/pages_controller_07_spec.rb