buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Baran" <meba...@gmail.com>
Subject Re: ScalaCheck
Date Sun, 15 Jun 2008 08:53:33 GMT
I finished porting my tests to scalatest, which took far less time than I'd
suspected.

However, how do I instruct Buildr to run these Scalatests?  What do I put in
my buildfile?

On an unrelated note, I'm getting some weird errors in Buildr:  when I
download dependencies that I add, the console complains:

stty: standard input Invalid argument => dependency seems to download
normally => stat.st_gid unsupported on this platform

Rake aborts and I'm left high and dry.  However, if I run buildr a couple
times, enough to download every dependency, it finally works.  I'm on AMD64
linux running Buildr on Jruby with Java 1.6.

Help with either of these two concerns is much obliged,
Mark

On Tue, Jun 10, 2008 at 8:09 AM, Alex Boisvert <boisvert@intalio.com> wrote:

> You can refer to ScalaTest's website (http://www.artima.com/scalatest/)
> for
> some examples on how to use ScalaCheck from within ScalaTest.
>
> I just tried this one that uses ScalaCheck properties:
>
> import org.scalatest.prop.PropSuite
> import org.scalacheck.Arbitrary._
> import org.scalacheck.Prop._
>
> class MySuite extends PropSuite {
>
>  test("list concatenation") {
>    val x = List(1, 2, 3)
>    val y = List(4, 5, 6)
>    assert(x ::: y === List(1, 2, 3, 4, 5, 6))
>    check((a: List[Int], b: List[Int]) => a.size + b.size == (a ::: b).size)
>  }
>
>  test(
>    "list concatenation using a test method",
>    (a: List[Int], b: List[Int]) => a.size + b.size == (a ::: b).size
>  )
> }
>
> alex
>
>
> On Mon, Jun 9, 2008 at 9:14 PM, Mark Baran <mebaran@gmail.com> wrote:
>
> > What do you mean by implement org.scalatest.Sute?  Is this something I
> > extend?  If you link me to some good doc, I'm more than happily bug test.
> >
> > I don't know much about ScalaTest, but if you tell me how to set it up
> I'll
> > do the rest!
> >
> > Mark
> >
> >
> > On Jun 10, 2008, at 12:03 AM, Alex Boisvert wrote:
> >
> >  On Mon, Jun 9, 2008 at 1:08 PM, Mark Baran <mebaran@gmail.com> wrote:
> >>
> >>  I'd like to use buildr with ScalaCheck, for a Scala program I'm
> currently
> >>> writing.  How would I do this?
> >>>
> >>
> >>
> >> Hi Mark,
> >>
> >> Thanks for opening the door for me :)
> >>
> >> I just committed support for ScalaTest, ScalaCheck and Specs test
> >> frameworks
> >> on the Buildr trunk.   We have good tests for ScalaTest right now.  I've
> >> manually tested Specs but still need to write automated tests for it.
> I
> >> haven't tested ScalaCheck support at all yet, but you're welcome to give
> >> it
> >> a try.   At this time it's assumed that you use ScalaCheck through
> >> ScalaTest
> >> or Specs.    ScalaCheck tests must implement "org.scalatest.Suite"
> whereas
> >> Specs tests must reside in a class with a name ending with "Spec" or
> >> "Specs".  The test framework should kick in automatically by the
> presence
> >> of
> >> any .scala file under src/test/scala.
> >>
> >> There's a few additional things left to do such as logging Specs output
> to
> >> file and better detection of Specs test but the basics should work.
> I'll
> >> be adding documentation soon too.
> >>
> >> Give it a go and let me know if you find anything irregular.
> >>
> >> cheers,
> >> alex
> >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message