buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joakim Ohlrogge" <>
Subject Problems with specs
Date Fri, 12 Sep 2008 21:17:22 GMT
Hi all,

I am new to builder and am in a bit of trouble. I am trying scala
specs in buildr 1.3.2 and it works fine until I want to make the spec
runnable with JUnit.
When I add

class PublishSiteGraphSpecTest extends JUnit4(PublishSiteGraphSpec)

To my spec I get:

NoClassDefFoundError: junit/framework/Test
rake aborted!

from buildr.

I tried to add junit to test.with but it didn't work. I figured out
that my problem was related to the class-path of ScalaTest in
test_framework.rb and by adding JUnit::REQUIRES to the present list of
requirements, like this:

      # ScalaTest dependencies
      DEPENDS = ["org.scalatest:scalatest:jar:#{VERSION}"] +
                 JMock::REQUIRES +
                 ScalaSpecs::REQUIRES +
                 ScalaCheck::REQUIRES +

It works.

I bet there is a better way, I tried to open the class in ~/buildr.rb
and change the constant but I just get warnings that I'm trying to
change it. I also noticed that the buildr.rb is not picked up if I put
it in the same directory as my buildfile (the homepage says that
buildr will look for a buildr.rb in the build-directory and I assumed
that the build-directory is the same as the directory with the

What is the best way to make this kind of patches? I would really like
to be able to make these changes by just checking in a buildr.rb
together with my buildfile or something comparably easy. Especially
since I noticed that you have to be root to change gem-files in

I'm probably overlooking something simple and I can't seem to make
google dig up the correct information for me so I thought I'd ask

Best regards!
/Joakim Ohlrogge

View raw message