diff --git a/spec/jasmine_self_test_config.rb b/spec/jasmine_self_test_config.rb index cf01391..f8bd819 100644 --- a/spec/jasmine_self_test_config.rb +++ b/spec/jasmine_self_test_config.rb @@ -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 \ No newline at end of file diff --git a/spec/server_spec.rb b/spec/server_spec.rb index 8d0ed6b..7397716 100644 --- a/spec/server_spec.rb +++ b/spec/server_spec.rb @@ -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('

Couldn\\'t load /spec/NonExistantFile.js!

');" + end end \ No newline at end of file