Sha256: 44b8807bd45c6aef79a5e382a42f3a78522d1e5f7f503b8fea3e535ed1f0f2d4

Contents?: true

Size: 1.04 KB

Versions: 20

Compression:

Stored size: 1.04 KB

Contents

__loading__ = []
__loadDelay__ = 1000

originalPrint = print
print = puts

readFile = function(path, callback) {
  __loading__.push(path)
  var promise = node.fs.cat(path, "utf8")
  promise.addErrback(function(){ throw "failed to read file `" + path + "'" })
  promise.addCallback(function(contents){
    setTimeout(function(){
      if (__loading__[0] == path)
        __loading__.shift(), callback(contents)
      else
        setTimeout(arguments.callee, 50)
    }, 50)
  })  
}

load = function(path) {
  readFile(path, function(contents){
    eval(contents)
  })
}

load('lib/jspec.js')
load('spec/modules.js')
load('spec/spec.grammar-less.js')

setTimeout(function(){
  JSpec
  .exec('spec/spec.grammar.js')
  .exec('spec/spec.js')
  .exec('spec/spec.matchers.js')
  .exec('spec/spec.utils.js')
  .exec('spec/spec.shared-behaviors.js')
  setTimeout(function(){ 
    JSpec.run({ formatter : JSpec.formatters.Terminal, failuresOnly : false })
    setTimeout(function() {
      JSpec.report()
    }, __loadDelay__ / 3)
  }, __loadDelay__ / 3)
}, __loadDelay__ / 3)

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
mattpuchlerz-jspec-2.11.0 spec/spec.node.js
visionmedia-jspec-2.10.0 spec/spec.node.js
visionmedia-jspec-2.11.0 spec/spec.node.js
visionmedia-jspec-2.11.1 spec/spec.node.js
visionmedia-jspec-2.11.2 spec/spec.node.js
visionmedia-jspec-2.8.3 spec/spec.node.js
visionmedia-jspec-2.8.4 spec/spec.node.js
visionmedia-jspec-2.9.0 spec/spec.node.js
visionmedia-jspec-2.9.1 spec/spec.node.js
jspec-2.11.13 spec/spec.node.js
jspec-2.11.12 spec/spec.node.js
jspec-2.11.10 spec/spec.node.js
jspec-2.11.9 spec/spec.node.js
jspec-2.11.8 spec/spec.node.js
jspec-2.11.7 spec/spec.node.js
jspec-2.11.6 spec/spec.node.js
jspec-2.11.5 spec/spec.node.js
jspec-2.11.4 spec/spec.node.js
jspec-2.11.3 spec/spec.node.js
jspec-2.11.2 spec/spec.node.js