Skip to content

Instantly share code, notes, and snippets.

@GraemeF
Created November 28, 2011 17:43
Show Gist options
  • Save GraemeF/1401254 to your computer and use it in GitHub Desktop.
Save GraemeF/1401254 to your computer and use it in GitHub Desktop.
vows-bdd
{Feature} = require "vows-bdd"
vows = require 'vows'
assert = require 'assert'
Feature("Share stuff between steps", module)
.scenario("Set properties on given and when")
.given "A is set", ->
@A = "A"
@callback()
.when "I set B", ->
@B = "B"
@callback()
.then "A should still be set", ->
assert.equal @A, "A"
.and "B should still be set", ->
assert.equal @B, "B"
.complete()
.finish(module)
@GraemeF
Copy link
Author

GraemeF commented Nov 28, 2011

That's great - so basically "don't do that" :)

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment