#35 ✓resolved
Matt Haley

Shoulda macro causing empty test unit run

Reported by Matt Haley | February 2nd, 2009 @ 01:34 AM

By calling require test/unit in the Shoulda macro an empty test suite is being created. I've created a patch that creates the Shoulda macro by opening Test::Unit::TestCase as shown in the Shoulda docs.

I've testing this patch in my Rails app, and it prevents the empty test suite, and the macro works as it should in a unit test.

Here's what I mean by empty test suite:


Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader
Started
....................................................................................................................................................................................................................................................................................................................................................................
Finished in 25.911562 seconds.

356 tests, 536 assertions, 0 failures, 0 errors
Loaded suite /usr/bin/rake
Started

Finished in 0.000309 seconds.

0 tests, 0 assertions, 0 failures, 0 errors

The part where it says 0 test, 0 assertions....

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket

Pages