Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created February 22, 2011 23:42
Show Gist options
  • Save jbrechtel/839673 to your computer and use it in GitHub Desktop.
Save jbrechtel/839673 to your computer and use it in GitHub Desktop.
import org.scalatest.Spec
import org.scalatest.matchers.ShouldMatchers
class BowlingGameSpecs extends Spec with ShouldMatchers {
describe("Playing a game") {
it("should have a score of zero for a game with all zero rolls") {
val game = new BowlingGame(List(0,0,0,0,0,0,0,0,0,0)
game.score should equal(0)
}
}
}
import scala.collection.mutable._
class BowlingGame(val reverseRolls: List[Int]) {
def score = -1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment