Hi all! I have a couple of tests that should fail, but don''t. They involve rendering of templates using partials with locals. If I run one test alone, it fails because I have forgotten to pass the locals in that test. If I run the same test just after another test that renders the same partial passing locals correctly, both tests succeed! I seems the locals passed in the first test are passed to the second test, only with nil values. Is this a known problem? Is there a workaround that only involves changing my tests, or do I have to change my templates? All replies are appreciated, and feel free to direct me to relevant documentation. Uwe --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Craig Demyanovich
2008-Feb-15 17:05 UTC
Re: Dependency between tests using partials and locals
I''m not aware of such a problem, so I can''t point you anywhere else. I''d like to see some tests and code that demonstrate the problem, though; I''m intrigued. Craig --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I attach an example application that does not run, but you can run the tests. Both test cases "wet" and "dry" should fail, and the "wet" test case fails if run alone, but not together with the "dry" test case. Give it a try, and let me know your results. Uwe On Fri, 2008-02-15 at 12:05 -0500, Craig Demyanovich wrote:> I''m not aware of such a problem, so I can''t point you anywhere else. > I''d like to see some tests and code that demonstrate the problem, > though; I''m intrigued. > > Craig > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---