From 3213a8891c1550611607cfa4bfea02c24eb54480 Mon Sep 17 00:00:00 2001 From: Toby Retallick Date: Mon, 7 Oct 2024 20:43:31 +0100 Subject: [PATCH] chore: update rspec config to support testing view components --- spec/spec_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0993b7c4..9caea8db 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,12 @@ +require "capybara/rspec" +require "view_component/test_helpers" +require "view_component/system_test_helpers" + RSpec.configure do |config| + config.include ViewComponent::TestHelpers, type: :component + config.include ViewComponent::SystemTestHelpers, type: :component + config.include Capybara::RSpecMatchers, type: :component + config.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end