Skip to content

Commit

Permalink
Fix context/should wording
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Jan 4, 2016
1 parent 0df469c commit 2bc455e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_webrobots.rb
Expand Up @@ -31,7 +31,7 @@ class TestWebRobots < Test::Unit::TestCase
})
end

should "allow any robot" do
should "be treated as full allow" do
assert @robots.allowed?('http://site1.example.org/index.html')
assert @robots.allowed?('http://site1.example.org/private/secret.txt')
assert @robots.allowed?('http://site2.example.org/index.html')
Expand All @@ -43,7 +43,7 @@ class TestWebRobots < Test::Unit::TestCase
end
end

context "robots.txt that cannot be fetched" do
context "nil or error from a custom http_get proc" do
setup do
@robots = WebRobots.new('RandomBot', :http_get => lambda { |uri|
case uri.to_s
Expand All @@ -67,7 +67,7 @@ class TestWebRobots < Test::Unit::TestCase
})
end

should "disallow any robot" do
should "be treated as full disallow" do
assert @robots.disallowed?('http://site1.example.org/index.html')
assert @robots.disallowed?('http://site1.example.org/private/secret.txt')
assert @robots.disallowed?('http://site2.example.org/index.html')
Expand Down Expand Up @@ -412,7 +412,7 @@ class TestWebRobots < Test::Unit::TestCase
@robots_hisbot = WebRobots.new('HisBot', :http_get => http_get)
end

should "read options" do
should "be properly read" do
options = @robots_mybot.options('http://www.example.org/')
assert_equal 2, options.size
assert_equal 'Foo', @robots_mybot.option('http://www.example.org/', 'Option1')
Expand Down

0 comments on commit 2bc455e

Please sign in to comment.