From 8de1bd8cf012522d00df5063c3bbe16bca23ed72 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Thu, 12 Jan 2012 18:07:08 -0500 Subject: [PATCH] clean up some fixes --- ext/jasmine-webkit-specrunner/Runner.cpp | 4 +++- lib/jasmine/headless/runner.rb | 6 +++++- spec/lib/jasmine/headless/runner_spec.rb | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ext/jasmine-webkit-specrunner/Runner.cpp b/ext/jasmine-webkit-specrunner/Runner.cpp index cc20f49..66943a5 100644 --- a/ext/jasmine-webkit-specrunner/Runner.cpp +++ b/ext/jasmine-webkit-specrunner/Runner.cpp @@ -71,7 +71,9 @@ void Runner::loadSpec() outputFiles.enqueue(outputFile); } - page.mainFrame()->load(runnerFiles.dequeue()); + QString runnerFile = runnerFiles.dequeue(); + + page.mainFrame()->load(runnerFile); ticker.start(); } diff --git a/lib/jasmine/headless/runner.rb b/lib/jasmine/headless/runner.rb index 4f3245e..251ed08 100644 --- a/lib/jasmine/headless/runner.rb +++ b/lib/jasmine/headless/runner.rb @@ -64,7 +64,11 @@ module Jasmine command += targets.flatten.collect do |target| target = File.expand_path(target) - target = server_uri + target if options[:use_server] + if options[:use_server] + target = server_uri + target + else + target = "file://" + target + end target end diff --git a/spec/lib/jasmine/headless/runner_spec.rb b/spec/lib/jasmine/headless/runner_spec.rb index 46b4e94..1def973 100644 --- a/spec/lib/jasmine/headless/runner_spec.rb +++ b/spec/lib/jasmine/headless/runner_spec.rb @@ -70,7 +70,7 @@ describe Jasmine::Headless::Runner do end def self.it_should_have_basics - it { should include(target) } + it { should include('file://' + File.expand_path(target)) } end context 'colors' do