Automatically roll up any js files in spec/helpers and add them as spec_helpers
This commit is contained in:
parent
fcc1872d48
commit
7c043eb5d0
|
@ -14,7 +14,8 @@ if ARGV[0] == 'server'
|
|||
puts " http://localhost:8888/run.html"
|
||||
Jasmine::SimpleServer.start(8888,
|
||||
lambda { JasmineHelper.specs },
|
||||
JasmineHelper.dir_mappings)
|
||||
JasmineHelper.dir_mappings,
|
||||
:spec_helpers => JasmineHelper.spec_helpers)
|
||||
end
|
||||
|
||||
if ARGV[0] == 'init'
|
||||
|
|
2
jasmine
2
jasmine
|
@ -1 +1 @@
|
|||
Subproject commit f9d73761bb0eaf5a38d522c7d5b0557efc693cd1
|
||||
Subproject commit 8feb285ca839cb383eb433c5660ab0f98e86704b
|
|
@ -37,6 +37,14 @@ class JasmineHelper
|
|||
spec_files.collect {|f| f.sub(jasmine_spec_dir, "/spec")}
|
||||
end
|
||||
|
||||
def self.spec_helpers_files
|
||||
Dir.glob(File.join(jasmine_spec_dir, "helpers/**/*.js"))
|
||||
end
|
||||
|
||||
def self.spec_helpers
|
||||
spec_helpers_files.collect {|f| f.sub(jasmine_spec_dir, "/spec")}
|
||||
end
|
||||
|
||||
def self.dir_mappings
|
||||
{
|
||||
"/spec" => jasmine_spec_dir,
|
||||
|
|
|
@ -8,7 +8,8 @@ require File.expand_path(File.join(JasmineHelper.jasmine_root, "contrib/ruby/jas
|
|||
|
||||
jasmine_runner = Jasmine::Runner.new(SeleniumRC::Server.new.jar_path,
|
||||
JasmineHelper.spec_file_urls,
|
||||
JasmineHelper.dir_mappings)
|
||||
JasmineHelper.dir_mappings,
|
||||
:spec_helpers => JasmineHelper.spec_helpers)
|
||||
|
||||
spec_builder = Jasmine::SpecBuilder.new(JasmineHelper.raw_spec_files, jasmine_runner)
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ def start_jasmine_server
|
|||
|
||||
Jasmine::SimpleServer.start(8888,
|
||||
lambda { JasmineHelper.spec_file_urls },
|
||||
JasmineHelper.dir_mappings)
|
||||
JasmineHelper.dir_mappings,
|
||||
:spec_helpers => lambda { JasmineHelper.spec_helpers })
|
||||
end
|
||||
|
||||
namespace :jasmine do
|
||||
|
|
Loading…
Reference in New Issue