Guest User

Untitled

a guest
Jan 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. require 'spec_helper'
  2.  
  3. describe PagesController do
  4. render_views
  5.  
  6. before(:each) do
  7. @base_title = "Ruby on Rails Tutorial Sample App"
  8. end
  9.  
  10. describe "GET 'home'" do
  11. it "should be successful" do
  12. get 'home'
  13. response.should be_success
  14. end
  15.  
  16. it "should have the right title" do
  17. get 'home'
  18. response.should have_selector("title",
  19. :content => @base_title + " | Home")
  20. end
  21. end
  22.  
  23. describe "GET 'contact'" do
  24. it "should be successful" do
  25. get 'contact'
  26. response.should be_success
  27. end
  28.  
  29. it "should have the right title" do
  30. get 'home'
  31. response.should have_selector("title",
  32. :content => @base_title + " | Contact")
  33. end
  34. end
  35.  
  36. describe "GET 'about'" do
  37. it "should be successful" do
  38. get 'about'
  39. response.should be_success
  40. end
  41.  
  42. it "should have the right title" do
  43. get 'home'
  44. response.should have_selector("title",
  45. :content => @base_title + " | About")
  46. end
  47. end
  48.  
  49. end
Add Comment
Please, Sign In to add comment