More specs.

This commit is contained in:
Christian Williams 2009-12-28 15:24:49 -06:00
parent 00c7d3ca29
commit 2045226ba7
2 changed files with 7 additions and 4 deletions

View File

@ -27,8 +27,4 @@ class JasmineSelfTestConfig < Jasmine::Config
"/spec" => spec_dir
}
end
#
# def specs
# Jasmine.cachebust(spec_files).collect {|f| f.sub(spec_dir, "/spec")}
# end
end

View File

@ -55,4 +55,11 @@ describe Jasmine::Server do
body.should satisfy {|s| s.index("/src/file1.js") < s.index("/spec/file2.js") }
end
end
it "should display an error using JS for 404's" do
code, headers, body = @thin_app.call("PATH_INFO" => "/spec/NonExistantFile.js", "SCRIPT_NAME" => "xxx")
code.should == 200 # todo: shouldn't this be 404? will that work with all browsers?
headers["Content-Type"].should == "application/javascript"
read(body).should == "document.write('<p>Couldn\\'t load /spec/NonExistantFile.js!</p>');"
end
end