Skip to content

Instantly share code, notes, and snippets.

@yoshiori
Forked from yamashiro/gist:2835272
Created May 30, 2012 10:38
Show Gist options
  • Save yoshiori/2835411 to your computer and use it in GitHub Desktop.
Save yoshiori/2835411 to your computer and use it in GitHub Desktop.
Traitつき無名クラス
import org.specs2.mutable._
trait BarTrait {}
class Hoge {}
class TraitGetClassTest extends Specification {
"Trait mixin " should {
"getClass " in {
val hoge = new Hoge with BarTrait
hoge.isInstanceOf[Hoge] must beTrue
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment