Skip to content

Instantly share code, notes, and snippets.

@bvenners
Created March 27, 2014 16:03
Show Gist options
  • Save bvenners/9811002 to your computer and use it in GitHub Desktop.
Save bvenners/9811002 to your computer and use it in GitHub Desktop.
feature("TV power button") {
scenario(
"User presses power button when TV is off"
Given "a TV set that is switched off"
When "the power button is pressed"
Then "the TV should switch on"
) {
// Given
val tv = new TVSet
assert(!tv.isOn)
// When
tv.pressPowerButton()
// Then
assert(tv.isOn)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment