Missing partial in tests #1611
Unanswered
cpjmcquillan
asked this question in
Q&A
Replies: 1 comment 9 replies
-
Just out of curiosity, does using |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thought I'd open a quick discussion in case this is a known issue, something obvious, or indeed intended behaviour.
I should get time to look into it in more detail in the next week or so, and I'll create a small repo that reproduces the issue.
I have a component that needs to render some partials (and these partials render some partials too). It's a whole journey of refactoring, but I wan't to make it as straightforward and pain free as possible, so these partials are staying unchanged.
For example:
The component renders perfectly fine in development, but in tests we get the below error when trying to render the component.
Updating the paths to be explicit (i.e
<%= render "providers/other_details" %>
) resolves the issue, but I don't want to change every partial reference right now (there are lots).I figured this might be to do with autoloading, or where
render
looks for partials.Is there a way to get tests to behave the same as development/production and find the partials?
Beta Was this translation helpful? Give feedback.
All reactions