Advertisement
Guest User

Untitled

a guest
Sep 20th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. describe 'Static pages'
  4.  
  5. subject { page }
  6.  
  7. describe "Home page" do
  8. before { visit root_path }
  9.  
  10. it { should have selector('h1', text: 'Sample App') }
  11. it { should have_selector('title',
  12. text: "Ruby on Rails Totorial Sample App") }
  13. it { should_not have_selector('title', text: '| Home') }
  14.  
  15. end
  16.  
  17.  
  18. describe "Help page" do
  19. before { visit help_path }
  20.  
  21. it { should have_selector('h1', text: 'Help') }
  22. it { should have_selector('title',
  23. text: "Ruby on Rails Tutorial Sample App | Help") }
  24.  
  25. end
  26.  
  27.  
  28. describe "About page" do
  29.  
  30. before {visit about_path}
  31.  
  32. it { should have_selector('h1', text: 'About Us') }
  33. it { should have_selector('title',
  34. text: "Ruby on Rails Tutorial Sample App | Abous Us") }
  35.  
  36. end
  37.  
  38. describe "Contact page" do
  39.  
  40. before { visit contact_path }
  41.  
  42. it { should have_selector('h1', text: 'Contact') }
  43.  
  44. it { should have_selector('title',
  45. text: "Ruby on Rails Tutorial Sample App | Contact") }
  46.  
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement