Permalink
Browse files

More changes, specs.

  • Loading branch information...
1 parent 59c8535 commit 73c8fef43e6cf8fa681f3e5b341f3a7b86bde6e6 @xian xian committed Dec 28, 2009
Showing with 11 additions and 8 deletions.
  1. 0 lib/jasmine/{run.html → run.html.erb}
  2. +2 −1 lib/jasmine/server.rb
  3. +9 −7 spec/server_spec.rb
File renamed without changes.
View
@@ -15,12 +15,13 @@ def call(env)
run
end
+ #noinspection RubyUnusedLocalVariable
def run
jasmine_files = @jasmine_files
css_files = @jasmine_stylesheets + (Jasmine.files(@config.stylesheets) || [])
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,
{ 'Content-Type' => 'text/html' },
View
@@ -45,12 +45,14 @@ def read(body)
headers["Location"].should == "/"
end
- it "should serve /" do
- code, headers, body = @thin_app.call("PATH_INFO" => "/", "SCRIPT_NAME" => "xxx")
- code.should == 200
- body = read(body)
- body.should include("\"/src/file1.js")
- body.should include("\"/spec/file2.js")
- body.should satisfy {|s| s.index("/src/file1.js") < s.index("/spec/file2.js") }
+ describe "/ page" do
+ it "should load each js file in order" do
+ code, headers, body = @thin_app.call("PATH_INFO" => "/", "SCRIPT_NAME" => "xxx")
+ code.should == 200
+ body = read(body)
+ body.should include("\"/src/file1.js")
+ body.should include("\"/spec/file2.js")
+ body.should satisfy {|s| s.index("/src/file1.js") < s.index("/spec/file2.js") }
+ end
end
end

0 comments on commit 73c8fef

Please sign in to comment.