buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Saff" <da...@saff.net>
Subject Re: Example of checks (specifically on test.classes)
Date Wed, 06 Feb 2008 16:40:24 GMT
Sorry for the late appreciation, but that cleared things up for me.

Is it inappropriate to use check for things like asserting that some
tests are run?

   David Saff

On Jan 31, 2008 7:22 PM, Assaf Arkin <arkin@intalio.com> wrote:
> David,
>
> The check task is intended for, amongst other things, verify that your
> packages have the right contents.  It runs from the package task, so try
> this:
>
> $ buildr package
>
> Assaf
>
>
> On 1/31/08, David Saff <david@saff.net> wrote:
> >
> > All,
> >
> > I'm trying to restrict the test classes run by my project (which is
> > JUnit itself), but still make sure that something is run.  Right now,
> > I'm trying the following, and the check doesn't appear to fail, even
> > through no tests appear to be running:
> >
> > desc "The Junit project"
> > define "junit" do
> >   project.version = VERSION_NUMBER
> >   project.group = GROUP
> >   manifest["Implementation-Vendor"] = COPYRIGHT
> >   compile.with 'lib/hamcrest-core-1.1.jar' # Add classpath dependencies
> >   test.compile.with # Add classpath dependencies
> >   test.include "org.junit.tests.AllTests"
> >   package(:jar)
> >   check test.classes do
> >     it.should_not be_empty
> >   end
> > end
> >
> > My output is:
> >
> > (in /Users/saff/Documents/workspaces/junit/junit)
> > Building junit
> > Compiling 122 source files in junit:compile
> > Testing junit
> > Compiling 124 source files in junit:test:compile
> >
> > I've purposely broken one of the tests, so I know they're not just
> > silently passing.  AllTests is the suite that should include all of
> > the tests I actually want to run.  I'm about 24 hours old as a buildr
> > initiate, so gentle reproof appreciated.  Thanks,
> >
> >    David Saff
> >
>
>
>
> --
> CTO, Intalio
> http://www.intalio.com
>

Mime
View raw message