Advertisement
Guest User

static_pages_spec.rb

a guest
Aug 22nd, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.06 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3.     describe "Static pages" do
  4.    
  5.         describe "Home Page" do
  6.        
  7.         it "should have the h1 'Sample App'" do
  8.             visit '/static_pages/home'
  9.             page.should have_selector('h1', :text => 'Sample App')
  10.         end
  11.        
  12.         it "should have the title 'Home'"
  13.             visit '/static_pages/home'
  14.             page.should have_selector('title', :text => "Ruby on Rails Sample App | Home")
  15.             end
  16.         end
  17.        
  18.         describe "Help Page" do
  19.        
  20.             it "should have the h1 'Help'" do
  21.                 visit 'static_pages/help'
  22.                 page.should have_selector('h1', :text => 'Help')
  23.             end
  24.             it "should have the title 'Help'" do
  25.                     visit 'static_pages/help'
  26.                     page.should have_selector('title', :text => "Ruby on Rails Sample App | Help")
  27.             end
  28.         end
  29.  
  30.         describe "About Page" do
  31.            
  32.             it "should have the h1 'About'"
  33.                 visit 'static_pages/help'
  34.                 page.should have_selector('h1', :text => 'Help')
  35.             end
  36.            
  37.             it "should have the title 'Help'"
  38.                 visit 'static_pages/help'
  39.                 page.should have_selector('title', :text => "Ruby on Rails Sample App | About")
  40.             end
  41.         end
  42.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement