Rails Tests With Fixtures Suddenly Stopped Working From Command Line?

Now, this is a weird one. I'm hoping someone might have a clue as to why this started.

All of my Rails tests work fine in RadRails. However, if I try to run them from the command line via `rake`, they fail. After much searching, turns out that only the tests with fixtures were failing. And after even more investigation, it turns out that the method `setup_with_fixtures` was never being called. This method is defined in `fixtures.rb`, which also aliases the `setup` method to `setup_with_fixtures`.

To get my tests which use fixtures to work again, I had to place a call to `super` inside my test's `setup` method. This kicked off `setup_with_fixtures` just fine.

Now, here's the weird part. This all works without the explicit call to `super` in RadRails. Also, apparently I don't need this call because the builtin generators don't include that call.

So, something is happening in the load order on the command line with is altering the behavior of `setup` in tests.

Popular posts from this blog

The 29 Healthiest Foods on the Planet

Add SSL to your personal website

How to shrink the size of your Dart app when compiled to JavaScript