Skip to content

undefined method `render_inline' view component testing #1872

Closed Answered by niladrix719
niladrix719 asked this question in Q&A
Discussion options

You must be logged in to vote

@BlakeWilliams hi sorry for the act. I would like to answer this question as i solved it and would like to help the community

Previously render_line method was not accessible to me, but after i added config.include ViewComponent::TestHelpers, type: :component to the spec/rails_helper.rb file the issue got resolved

Like this:

RSpec.configure do |config|
  config.include ViewComponent::TestHelpers, type: :component
end

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@BlakeWilliams
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by niladrix719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants