I have quite a strange problem: there was a bug in my code where I
forgot to pass a local variable to a partial. This problem was not
detected by my functional tests although it lead to a
ActionView::TemplateError: undefined local variable or method
in my development (and unfortunately production) environment.
After digging deeper, I noticed that the functional test fails as
expected when it is executed without the other tests (using the -n
option). But when running all tests of the whole controller, the test
passes. I suspect the test-environment to somehow cache the partial
(it is also called by other tests) and thus played around with the
config.action_controller.perform_caching and
config.action_view.cache_template_extensions parameters, but without
success.
Does anybody have an idea where the problem comes from and how I can
fix it? When I can't trust my tests anymore, I am really stuck...
I have quite a strange problem: there was a bug in my code where I
forgot to pass a local variable to a partial. This problem was not
detected by my functional tests although it lead to a
ActionView::TemplateError: undefined local variable or method
in my development (and unfortunately production) environment.
After digging deeper, I noticed that the functional test fails as
expected when it is executed without the other tests (using the -n
option). But when running all tests of the whole controller, the test
passes. I suspect the test-environment to somehow cache the partial
(it is also called by other tests) and thus played around with the
config.action_controller.perform_caching and
config.action_view.cache_template_extensions parameters, but without
success.