Skip to content

Instantly share code, notes, and snippets.

@aconbere
Created May 14, 2011 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aconbere/971936 to your computer and use it in GitHub Desktop.
Save aconbere/971936 to your computer and use it in GitHub Desktop.
testing node-fake
fake = require("fake")
var namespace = { x: function () { this.whatever = "skimpy" } }
fakeX = fake.create()
fakeX.expects(namespace, "X")
.andReturns("AASDFASDF")
var y = new namespace.X()
assert.equal(y, "AASDFASDF")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment