-
Notifications
You must be signed in to change notification settings - Fork 0
/
copy back pages_controller_spec.rb
62 lines (51 loc) · 1.2 KB
/
copy back pages_controller_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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 "returns http success" 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 "returns http success" 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 "returns http success" 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
describe "GET 'help'" do
it "returns http success" do
get 'help'
response.should be_success
end
it "should have the right title" do
get 'help'
response.should have_selector("title",
:content => @base_title + " | Help")
end
end
end