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 > Do you know why? > > PS: yeah I know I can use mocha ;) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.