Skip to content
jamesward edited this page Mar 29, 2012 · 4 revisions

Welcome to the scalaKoansOnline wiki!

Q. How to validate the koans?

A. Evaluate the koan code with Twitter's eval-util. For background, see: Why Config?.

Q. What does a koan look like?

A. Included below.

import org.scalatest.matchers.ShouldMatchers
import support.KoanSuite

class AboutAsserts extends KoanSuite with ShouldMatchers {
    koan("asserts can take a boolean argument") {
        assert(true) // should be true
    }
    koan("foo") {
        assert(false)
    }
}

new AboutAsserts
Clone this wiki locally