alpha
Login
or
Join now
shuuji3.xyz
/
rails-tutorial-sample-app
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/shuuji3/rails-tutorial-sample-app.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
Add setup() to do DRY.
author
TAKAHASHI Shuuji
date
6 years ago
(Dec 18, 2019, 3:50 PM +0900)
commit
7edb946d
7edb946d792cbfdb30b13f41bf3e0feffe5e9d3d
parent
25420dd0
25420dd072aa097c5e3417512d5c55edabbb14cf
+7
-3
1 changed file
Expand all
Collapse all
Unified
Split
test
controllers
static_pages_controller_test.rb
+7
-3
test/controllers/static_pages_controller_test.rb
View file
Reviewed
···
1
1
require 'test_helper'
2
2
3
3
class StaticPagesControllerTest < ActionDispatch::IntegrationTest
4
4
+
def setup
5
5
+
@base_title = "Ruby on Rails Tutorial Sample App"
6
6
+
end
7
7
+
4
8
test "should get home" do
5
9
get static_pages_home_url
6
10
assert_response :success
7
7
-
assert_select "title", "Home | Ruby on Rails Tutorial Sample App"
11
11
+
assert_select "title", "Home | #{@base_title}"
8
12
end
9
13
10
14
test "should get help" do
11
15
get static_pages_help_url
12
16
assert_response :success
13
13
-
assert_select "title", "Help | Ruby on Rails Tutorial Sample App"
17
17
+
assert_select "title", "Help | #{@base_title}"
14
18
end
15
19
16
20
test 'should get about' do
17
21
get static_pages_about_url
18
22
assert_response :success
19
19
-
assert_select "title", "About | Ruby on Rails Tutorial Sample App"
23
23
+
assert_select "title", "About | #{@base_title}"
20
24
end
21
25
end