Skip to content

Commit

Permalink
Berlin clock specs
Browse files Browse the repository at this point in the history
  • Loading branch information
tjanek committed Apr 16, 2015
1 parent 1331c7d commit 9ba2f2d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions kata-14-berlin-clock/src/test/groovy/BerlinClockSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,19 @@ class BerlinClockSpec extends Specification {
8 | "O"
}

def "Bottom minutes should light a yellow lamp for every minute left from top minutes"() {
expect:
berlinClock.bottomMinutes(minute) == lamp

where:
minute | lamp
0 | "OOOO"
17 | "YYOO"
59 | "YYYY"
}

def "Berlin Clock should result correct berlin time in hours, minutes and seconds"() {
expect:
berlinClock.toBerlinTime("16:37:16") == ["Y", "RRRO", "ROOO", "YYRYYRYOOOO", "YYOO"]
}
}

0 comments on commit 9ba2f2d

Please sign in to comment.