test/unit/juicer/asset/path_test.rb in juicer-1.0.4 vs test/unit/juicer/asset/path_test.rb in juicer-1.0.5

- old
+ new

@@ -53,9 +53,15 @@ should "strip trailing slash and add scheme in hosts" do asset = Juicer::Asset::Path.new "../images/logo.png", :hosts => ["localhost/", "http://dev.server", "some.server/"] assert_equal ["http://localhost", "http://dev.server", "http://some.server"], asset.hosts end + + should "accept protocol-less hosts" do + asset = Juicer::Asset::Path.new "../images/logo.png", :hosts => ["localhost/", "//dev.server", "some.server/"] + + assert_equal ["http://localhost", "//dev.server", "http://some.server"], asset.hosts + end end context "asset absolute path" do should "raise exception without document root" do asset = Juicer::Asset::Path.new "../images/logo.png"