Best way to test output helpers #966
tonekk
started this conversation in
Component architecture
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi community,
I'm looking for the best way to test an output helper.
By
output helperI am not referring to a helper imported from rails helpers, but instead just a method that outputs markup, which is used by subclasses, like:Calling this method directly in a spec will lead to an error ("buffer not found" or similar).
My current approach is subclassing the component and use
view_template, but it feels a little awkward.Is there an easier solution?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions