Fixes for jasmine rake test:ci
This commit is contained in:
parent
7a446d53c0
commit
e8d582600c
44
Rakefile
44
Rakefile
@ -41,29 +41,31 @@ namespace :test do
|
|||||||
require "spec"
|
require "spec"
|
||||||
require 'spec/rake/spectask'
|
require 'spec/rake/spectask'
|
||||||
|
|
||||||
Spec::Rake::SpecTask.new(:ci) do |t|
|
task :ci => :build do
|
||||||
Rake::Task['build'].invoke
|
Spec::Rake::SpecTask.new(:lambda_ci) do |t|
|
||||||
t.spec_opts = ["--color", "--format", "specdoc"]
|
t.spec_opts = ["--color", "--format", "specdoc"]
|
||||||
t.spec_files = ["spec/jasmine_spec.rb"]
|
t.spec_files = ["spec/jasmine_spec.rb"]
|
||||||
end
|
end
|
||||||
|
Rake::Task[:lambda_ci].invoke
|
||||||
desc "Run jasmine tests via server"
|
|
||||||
|
|
||||||
task :jasmine_server do
|
|
||||||
require File.expand_path(File.join(File.dirname(__FILE__), "contrib/ruby/jasmine_spec_builder"))
|
|
||||||
|
|
||||||
includes = jasmine_sources + ['lib/TrivialReporter.js']
|
|
||||||
spec_files = Dir.glob("spec/**/*.js")
|
|
||||||
|
|
||||||
dir_mappings = {
|
|
||||||
"/spec" => "spec",
|
|
||||||
"/lib" => "lib",
|
|
||||||
"/src" => 'src'
|
|
||||||
}
|
|
||||||
|
|
||||||
puts "your tests are here:"
|
|
||||||
puts " http://localhost:8888/run.html"
|
|
||||||
|
|
||||||
Jasmine::SimpleServer.start(8888, includes + spec_files, dir_mappings)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
desc "Run jasmine tests via server"
|
||||||
|
task :jasmine_server do
|
||||||
|
require File.expand_path(File.join(File.dirname(__FILE__), "contrib/ruby/jasmine_spec_builder"))
|
||||||
|
|
||||||
|
includes = jasmine_sources + ['lib/TrivialReporter.js']
|
||||||
|
spec_files = Dir.glob("spec/**/*.js")
|
||||||
|
|
||||||
|
dir_mappings = {
|
||||||
|
"/spec" => "spec",
|
||||||
|
"/lib" => "lib",
|
||||||
|
"/src" => 'src'
|
||||||
|
}
|
||||||
|
|
||||||
|
puts "your tests are here:"
|
||||||
|
puts " http://localhost:8888/run.html"
|
||||||
|
|
||||||
|
Jasmine::SimpleServer.start(8888, includes + spec_files, dir_mappings)
|
||||||
end
|
end
|
@ -86,8 +86,7 @@ module Jasmine
|
|||||||
}
|
}
|
||||||
mappings.each do |from, to|
|
mappings.each do |from, to|
|
||||||
config[from] = Rack::File.new(to)
|
config[from] = Rack::File.new(to)
|
||||||
end
|
end
|
||||||
p mappings
|
|
||||||
|
|
||||||
app = Rack::URLMap.new(config)
|
app = Rack::URLMap.new(config)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user