Skip to content

Conversation

@rylanb
Copy link
Contributor

@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?

@rylanb
Copy link
Contributor Author

rylanb commented Dec 18, 2024

@joelhawksley do you want me to add a Changelog entry here? Seems like that is the last failing check but do documentation updates need that? 🤔

@joelhawksley
Copy link
Member

@joelhawksley do you want me to add a Changelog entry here? Seems like that is the last failing check but do documentation updates need that? 🤔

I'm fine either way! I like to recognize contributions of all kinds but I'm happy to merge without too.

@rylanb rylanb force-pushed the update-test-documentation-for-rspec-setup branch from 4745eb6 to 3ea7203 Compare December 18, 2024 19:37
Fixing lint callout for double quoted strings instead of single
@rylanb rylanb force-pushed the update-test-documentation-for-rspec-setup branch from bd3bb52 to 140e993 Compare December 18, 2024 20:00
@rylanb
Copy link
Contributor Author

rylanb commented Dec 18, 2024

Ok added a note to docs/Changelog and all checks are good now!

@joelhawksley joelhawksley enabled auto-merge (squash) December 18, 2024 21:10
@joelhawksley joelhawksley merged commit 1278b8b into ViewComponent:main Dec 18, 2024
21 checks passed
@rylanb rylanb deleted the update-test-documentation-for-rspec-setup branch December 18, 2024 21:36
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.

2 participants