Permalink
Browse files

Added a test case for a robots.txt with just user-agent & sitemap and…

… no blank line between them, and got it to work
  • Loading branch information...
prakashmurthy committed Jan 24, 2012
1 parent e8cc0d1 commit ebb6b48f562260056ed461d6331a7dbbc697bacc
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/webrobots/robotstxt.ry
  2. +1 −1 test/test_webrobots.rb
@@ -341,7 +341,7 @@ Disallow: /
else
@options[ruleline.token.downcase] = ruleline.value
end
- }
+ } if ruleslines
@acls.replace @acls.sort_by { |x|
[-x.value.length, x.is_a?(AllowLine) ? -1 : 0]
}
View
@@ -674,7 +674,7 @@ def get uri
should "be properly parsed" do
assert @robots.allowed?("http://site1.example.com/foo")
- # assert_equal(["http://site1.example.com/text/sitemap.xml"], @robots.sitemaps("http://site1.example.com/"))
+ assert_equal(["http://site1.example.com/text/sitemap.xml"], @robots.sitemaps("http://site1.example.com/"))
end
end

0 comments on commit ebb6b48

Please sign in to comment.