Skip to content

Instantly share code, notes, and snippets.

@sole
Created May 28, 2012 19:48
Show Gist options
  • Save sole/2820890 to your computer and use it in GitHub Desktop.
Save sole/2820890 to your computer and use it in GitHub Desktop.
var Car = function() {
this.beep = function() {
return 'beep';
}
this.honk = function() {
return 'honk';
}
return this;
},
car = new Car();
var carTest = new MUNIT.Test([
function beepDoesBeep() {
this.assertTrue(car.beep() == 'beep');
},
function beepBarks() {
this.assertTrue(car.beep() == 'woof');
},
function aHonkIsAHonkIsAHonk() {
this.assertEquals(car.honk(), 'honk');
}
]);
var results = carTest.runTests();
document.body.appendChild(MUNIT.prettyFormat(results));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment