Load spec_hhelpers before spec definitions

This commit is contained in:
ragaskar
2009-11-25 08:01:09 -08:00
parent 1c2780d0c1
commit e3585b79f0
7 changed files with 54 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
namespace :jasmine do
require 'jasmine-ruby'
helper_overrides = File.expand_path(File.join(File.dirname(__FILE__), "spec/javascripts/jasmine_helper.rb"))
helper_overrides = File.expand_path(File.join(File.dirname(__FILE__), "spec/helpers/jasmine_helper.rb"))
if File.exist?(helper_overrides)
require helper_overrides
end
@@ -19,7 +19,10 @@ namespace :jasmine do
Jasmine::SimpleServer.start(8888,
lambda { JasmineHelper.specs },
JasmineHelper.dir_mappings)
JasmineHelper.dir_mappings,
{ :spec_helpers => JasmineHelper.files + JasmineHelper.spec_helpers,
:stylesheets => JasmineHelper.stylesheets
})
end
end

View File

@@ -0,0 +1,12 @@
class JasmineHelper
def self.files
#return a list of files you want to load before your spec defintions load
[]
end
def self.stylesheets
#return a list of stylesheets you want to load in the runner
[]
end
end

1
templates/spec_helper.js Normal file
View File

@@ -0,0 +1 @@
//You may load required files here, or create test-runner-wide environment settings.