Skip to content

Instantly share code, notes, and snippets.

@mike-neck
Created August 17, 2012 13:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mike-neck/3378714 to your computer and use it in GitHub Desktop.
Save mike-neck/3378714 to your computer and use it in GitHub Desktop.
Spockこういう書き方もできる
package org.mikeneck.grenail
import spock.lang.Specification
class WebHandlerSpec extends Specification {
def 'initialize test' () {
when :
def handler = init
then :
handler.root == file
where :
init | file
new WebHandler() | new File('.')
new WebHandler('public') | new File('public')
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment