Test runs by itself, fails when run with everything...

Emanuel Rietveld codehotter at gmail.com
Fri Sep 9 05:42:44 UTC 2011


On 09/08/2011 11:23 PM, Darryl L. Pierce wrote:
> I have a unit test that is failing to run under Rake when it runs with
> all unit tests. But if I run it by itself using either "rake test
> TEST=path/to/file" or else run it with ruby using "ruby path/to/file" it
> passes every time.
>
> The failure is caused by the setup method not being invoked before each
> test, but only for that one class. The setup method in other classes run
> fine, and in this class as well when it runs by itself.
>
> Any suggestions or ideas for what to look at?

Another test run before it likely breaks this test. Purely out of
curiosity, can you figure out the test that causes it to break, take
that and the test that is being broken, and then create the smallest
possible test suite that also breaks in a similar way (and post it here)?


More information about the ruby-sig mailing list