Dependency between tests using partials and locals

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


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.


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.


should_fail.tgz (8.55 KB)