Skip to content

Instantly share code, notes, and snippets.

@tanepiper
Forked from AlexJWayne/load_specs.coffee
Created March 31, 2011 12:01
Show Gist options
  • Save tanepiper/896239 to your computer and use it in GitHub Desktop.
Save tanepiper/896239 to your computer and use it in GitHub Desktop.
loadSpecs = (paths...) ->
# expand all spec paths to full cache busted file paths
paths = for path in paths
"spec/#{path}_spec.js?#{new Date().getTime()}"
# Load the specs with head.js, and start a spec run 1 second after they load.
head.js paths..., ->
setTimeout ->
jasmine.getEnv().addReporter(new jasmine.TrivialReporter())
jasmine.getEnv().execute()
, 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment