On Aug 26, 10:57 am, Michel Pigassou <
dag...@gmail.com> wrote:
> Hi!
>
> I've discovered that when I reopen classes to return another value,
> everything works fine when launching the test manually but when I use rake
> test, the value set reopening the class impacts other tests.
>
Tests should leave the environment unchanged. That's why (for example)
transactions are used so that objects created in one test aren't there
when the next test runs. Your test framework doesn't know how to undo
whatever you did when you reopened the class, so the change persists.
If you absolutely have to do it this way, you'll need to undo the
change once the test that needs it is complete.
Fred