-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathListing_11.27.rb
More file actions
33 lines (28 loc) · 871 Bytes
/
Listing_11.27.rb
File metadata and controls
33 lines (28 loc) · 871 Bytes
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
require_relative 'test_helper'
class PalindromeAppTest < Minitest::Test
include Rack::Test::Methods
def app
Sinatra::Application
end
def test_index
get '/'
assert last_response.ok?
assert doc(last_response).at_css('h1')
title_content = doc(last_response).at_css('title').content
assert_equal "Learn Enough Ruby Sample App", title_content
end
def test_about
get '/about'
assert last_response.ok?
assert doc(last_response).at_css('h1')
title_content = doc(last_response).at_css('title').content
assert_equal "Learn Enough Ruby Sample App", title_content
end
def test_palindrome
get '/palindrome'
assert last_response.ok?
assert doc(last_response).at_css('h1')
title_content = doc(last_response).at_css('title').content
assert_equal "Learn Enough Ruby Sample App", title_content
end
end