Jasmine::Runner arranges for jasmine.js, json.js, and TrivialReporter.js to be included, so callers should remove those files.
This commit is contained in:
parent
5e8b52debf
commit
268cb0c6c5
@@ -13,20 +13,14 @@ desc "Run specs via server"
|
||||
task :jasmine_server do
|
||||
require File.expand_path(File.join(File.dirname(__FILE__), "../../contrib/ruby/jasmine_spec_builder"))
|
||||
|
||||
JASMINE_LIB = File.expand_path(File.join(File.dirname(__FILE__), '../../lib'))
|
||||
dir_mappings = {
|
||||
"/spec" => 'spec',
|
||||
"/lib" => JASMINE_LIB
|
||||
"/spec" => 'spec'
|
||||
}
|
||||
|
||||
includes = ['lib/' + File.basename(Dir.glob("#{JASMINE_LIB}/jasmine*.js").first),
|
||||
'lib/json2.js',
|
||||
'lib/TrivialReporter.js']
|
||||
|
||||
spec_files = Dir.glob("spec/**/*[Ss]pec.js")
|
||||
|
||||
puts "your tests are here:"
|
||||
puts " http://localhost:8888/run.html"
|
||||
|
||||
Jasmine::SimpleServer.start(8888, includes + spec_files, dir_mappings)
|
||||
Jasmine::SimpleServer.start(8888, spec_files, dir_mappings)
|
||||
end
|
||||
|
||||
@@ -2,19 +2,12 @@ require 'rubygems'
|
||||
require File.expand_path(File.join(File.dirname(__FILE__), "../../../contrib/ruby/jasmine_spec_builder"))
|
||||
require "selenium_rc"
|
||||
|
||||
|
||||
JASMINE_LIB = File.expand_path(File.join(File.dirname(__FILE__), '../../../lib'))
|
||||
dir_mappings = {
|
||||
"/spec" => 'spec',
|
||||
"/lib" => JASMINE_LIB
|
||||
}
|
||||
|
||||
includes = ['lib/' + File.basename(Dir.glob("#{JASMINE_LIB}/jasmine*.js").first),
|
||||
'lib/json2.js',
|
||||
'lib/TrivialReporter.js']
|
||||
|
||||
spec_files = Dir.glob("spec/**/*[Ss]pec.js")
|
||||
jasmine_runner = Jasmine::Runner.new(SeleniumRC::Server.new.jar_path, includes + spec_files, dir_mappings)
|
||||
jasmine_runner = Jasmine::Runner.new(SeleniumRC::Server.new.jar_path, spec_files, dir_mappings)
|
||||
spec_builder = Jasmine::SpecBuilder.new(spec_files, jasmine_runner)
|
||||
|
||||
should_stop = false
|
||||
|
||||
Reference in New Issue
Block a user