remove jasmine server; use jasmine init to copy (or append) a Rakefile with common jasmine tasks

This commit is contained in:
ragaskar
2009-11-24 22:42:15 -08:00
parent 7c043eb5d0
commit bece09bba8
8 changed files with 99 additions and 44 deletions

27
templates/Rakefile Normal file
View File

@@ -0,0 +1,27 @@
namespace :jasmine do
require 'jasmine-ruby'
helper_overrides = File.expand_path(File.join(File.dirname(__FILE__), "spec/javascripts/jasmine_helper.rb"))
if File.exist?(helper_overrides)
require helper_overrides
end
require File.expand_path(File.join(JasmineHelper.root, "contrib/ruby/jasmine_spec_builder"))
desc "Run continuous integration tests"
require "spec"
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:ci) do |t|
t.spec_opts = ["--color", "--format", "specdoc"]
t.spec_files = [JasmineHelper.meta_spec_path]
end
task :server do
puts "your tests are here:"
puts " http://localhost:8888/run.html"
Jasmine::SimpleServer.start(8888,
lambda { JasmineHelper.specs },
JasmineHelper.dir_mappings)
end
end
desc "Run specs via server"
task :jasmine => ['jasmine:server']