Skip to content

Instantly share code, notes, and snippets.

@yoshiori
Forked from yamashiro/gist:2835272
Created May 30, 2012 10:38

Revisions

  1. yoshiori renamed this gist May 30, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions gistfile1.txt → gistfile1.scala
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ class TraitGetClassTest extends Specification {
    "Trait mixin " should {
    "getClass " in {
    val hoge = new Hoge with BarTrait
    hoge.getClass.toString must_== "Hoge"
    hoge.isInstanceOf[Hoge] must beTrue
    }
    }
    }
    }
  2. @yamashiro yamashiro created this gist May 30, 2012.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    import org.specs2.mutable._
    trait BarTrait {}
    class Hoge {}
    class TraitGetClassTest extends Specification {
    "Trait mixin " should {
    "getClass " in {
    val hoge = new Hoge with BarTrait
    hoge.getClass.toString must_== "Hoge"
    }
    }
    }