Skip to content

Instantly share code, notes, and snippets.

@ragaskar
Created June 30, 2011 12:03
Show Gist options
  • Save ragaskar/1056109 to your computer and use it in GitHub Desktop.
Save ragaskar/1056109 to your computer and use it in GitHub Desktop.
Refactored Baseketball and Football specs
describe("games", function() {
subject("game", function() { game });
describe("Basketball Game", function() {
given(game, function() { new BasketballGame(); });
its("fieldGoal.points", function() { expect.toEqual(2); });
})
describe("Football Game", function() {
given(game, function() { new FootballGame(); });
its("fieldGoal.points", function() { expect.toEqual(3); });
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment