Sha256: df0c5b6ae90f01982b9ea108501163e5f57d9c995d2389525ff775b28906a3e3

Contents?: true

Size: 562 Bytes

Versions: 6

Compression:

Stored size: 562 Bytes

Contents

(exports ? this).globalize = (fxn, name=null)=>
  functionName = if name is null then fxn.name else name
  (exports ? this)[functionName] = fxn


# MOCKING #
(exports ? this).mocks = {}

(exports ? this).addMock = (name, obj)=>
  (exports ? this).mocks[name] = obj


# RUNTIME PATCHING #
(exports ? this).patches = {}

(exports ? this).patch = (method, patch)=>
  (exports ? this).patches[method.name] = method
  method = patch

(exports ? this).restore = (method)=>
  method = (exports ? this).patches[method.name]
  delete (exports ? this).patches[method.name]

Version data entries

6 entries across 6 versions & 5 rubygems

Version Path
hoarder-js-0.0.2 spec/support/helpers.coffee
leonidas-0.0.1 spec/jasmine/support/helpers.coffee
messenger-js-0.0.1 spec/support/helpers.coffee
hoarder-js-0.0.1 spec/support/helpers.coffee
scribe-js-0.0.1 spec/support/helpers.coffee
cronus-0.0.1 spec/support/helpers.coffee