More changes, specs.
This commit is contained in:
parent
59c85355fc
commit
73c8fef43e
|
@ -15,12 +15,13 @@ module Jasmine
|
||||||
run
|
run
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#noinspection RubyUnusedLocalVariable
|
||||||
def run
|
def run
|
||||||
jasmine_files = @jasmine_files
|
jasmine_files = @jasmine_files
|
||||||
css_files = @jasmine_stylesheets + (Jasmine.files(@config.stylesheets) || [])
|
css_files = @jasmine_stylesheets + (Jasmine.files(@config.stylesheets) || [])
|
||||||
js_files = Jasmine.files(@config.js_files)
|
js_files = Jasmine.files(@config.js_files)
|
||||||
|
|
||||||
body = ERB.new(File.read(File.join(File.dirname(__FILE__), "run.html"))).result(binding)
|
body = ERB.new(File.read(File.join(File.dirname(__FILE__), "run.html.erb"))).result(binding)
|
||||||
[
|
[
|
||||||
200,
|
200,
|
||||||
{ 'Content-Type' => 'text/html' },
|
{ 'Content-Type' => 'text/html' },
|
||||||
|
|
|
@ -45,12 +45,14 @@ describe Jasmine::Server do
|
||||||
headers["Location"].should == "/"
|
headers["Location"].should == "/"
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should serve /" do
|
describe "/ page" do
|
||||||
code, headers, body = @thin_app.call("PATH_INFO" => "/", "SCRIPT_NAME" => "xxx")
|
it "should load each js file in order" do
|
||||||
code.should == 200
|
code, headers, body = @thin_app.call("PATH_INFO" => "/", "SCRIPT_NAME" => "xxx")
|
||||||
body = read(body)
|
code.should == 200
|
||||||
body.should include("\"/src/file1.js")
|
body = read(body)
|
||||||
body.should include("\"/spec/file2.js")
|
body.should include("\"/src/file1.js")
|
||||||
body.should satisfy {|s| s.index("/src/file1.js") < s.index("/spec/file2.js") }
|
body.should include("\"/spec/file2.js")
|
||||||
|
body.should satisfy {|s| s.index("/src/file1.js") < s.index("/spec/file2.js") }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue