Skip to content

Instantly share code, notes, and snippets.

@choan
Created March 6, 2009 13:12
Show Gist options
  • Save choan/74905 to your computer and use it in GitHub Desktop.
Save choan/74905 to your computer and use it in GitHub Desktop.
// jShoulda 1.2.x
describe("Un ukelele", {
setup: function() {
// setup routines
},
teardown : function() {
// teardown routines
}
},
it("mola mucho", function() {
// assertions
}),
describe("tenor",
it("es más grande que el soprano", function() {
// assertions
})
)
)();
// proposed syntax for jShoulda 2
jShoulda(config)
.before(function() {
// setup routines
})
.after(function() {
// teardown routines
})
.describe('Un ukelele')
.it('mola mucho', function() {
// assertions
})
.describe('tenor')
.it('es más grande que el soprano', function() {
// assertions
})
.end()
.end()
.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment