Skip to content

Commit dbda2c5

Browse files
committed
Make test smarter
1 parent c7d4cec commit dbda2c5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

unsocial_test.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require './unsocial.rb'
1+
require File.expand_path('../unsocial', __FILE__)
22
require 'test/unit'
33
require 'rack/test'
44

@@ -22,18 +22,18 @@ def test_not_found_should_respond_with_410
2222
assert_equal 410, last_response.status
2323
end
2424

25-
def test_robots_txt_should_respond_with_200
25+
def test_robots_txt_should_respond_ok
2626
get '/robots.txt'
27-
assert_equal 200, last_response.status
27+
assert last_response.ok?
2828
end
2929

30-
def test_google_verification_should_respond_with_200
30+
def test_google_verification_should_respond_ok
3131
get '/google3937f044695dbc67.html'
32-
assert_equal 200, last_response.status
32+
assert last_response.ok?
3333
end
3434

35-
def test_sitemap_xml_should_respond_with_200
35+
def test_sitemap_xml_should_respond_ok
3636
get '/sitemap.xml'
37-
assert_equal 200, last_response.status
37+
assert last_response.ok?
3838
end
3939
end

0 commit comments

Comments
 (0)