Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Update: Add a section for how to add the render_inline helpers to RSpec tests #2162

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rylanb
Copy link

@rylanb rylanb commented Nov 10, 2024

What are you trying to accomplish?

While getting started w/ View Component today, I struggled w/ errors like 'Undefined method render_inline for ...

What approach did you choose and why?

I updated the documentation to include a section referencing https://stackoverflow.com/questions/70041733/integrating-viewcomponent-with-rspec and how to add the view component test helpers

I believe that the comment above this section that mentions (Capybara matchers are available if the gem is installed) would indicate that adding require "capybara/rspec" or config.include Capybara::RSpecMatchers, type: :component is not a requirement to use those matchers. There may be some nuance that I don't fully understand to different setups though!

Welcome to any feedback

Anything you want to highlight for special attention from reviewers?

I'm happy to update for how to do this for minitest in test_helpers.rb, but I'm unsure if the sytnax is similar or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant