Sha256: c2f915e23a6f081c72283655754014274d1815ca94bb9bd357d3766c14c54892

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

describe PagesController do
  render_views
  
  before(:each) do
    @base_title = "<%= name.camelcase %>"
  end

  describe "#home", "(GET)" do

    before(:each) do
      get :home
    end

    it "is successful" do
      response.should be_success
    end

    it "has the correct title" do
      page.has_content?("#{@base_title} | Home")
    end

  end
  
  describe "#contact", "(GET)" do
    before(:each) do
      get :contact
    end
    
    it "is successful" do
      response.should be_success
    end
    
    it "has the correct title" do
      page.has_content?("#{@base_title} | Contact")
    end
  end

  describe "#about", "(GET)" do
    before(:each) do
      get :about
    end
    
    it "is successful" do
      response.should be_success
    end
    
    it "has the correct title" do
      page.has_content?("#{@base_title} | About")
    end
  end

  describe "#help", "(GET)" do
    before(:each) do
      get :help
    end
    
    it "is successful" do
      response.should be_success
    end
    
    it "has the correct title" do
      page.has_content?("#{@base_title} | Help")
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iceauth-0.0.4 lib/generators/iceauth/templates/spec/controllers/pages_controller_spec.rb.tt
iceauth-0.0.3 lib/generators/iceauth/templates/spec/controllers/pages_controller_spec.rb.tt
iceauth-0.0.2 lib/generators/iceauth/templates/spec/controllers/pages_controller_spec.rb.tt
iceauth-0.0.1 lib/generators/iceauth/templates/spec/controllers/pages_controller_spec.rb.tt