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