From 2dabc24344c0091024e90c49f9257b30c9c984aa Mon Sep 17 00:00:00 2001 From: Duncan Brown Date: Tue, 10 Mar 2020 13:56:30 +0000 Subject: [PATCH] Update actionview-component require process Following a change to the docs at https://github.com/github/view_component#installation and https://github.com/github/view_component#setting-up-rspec, part of a change to rename this gem to view_component (because it's not going to be in Rails 6.1). https://github.com/github/view_component/issues/206 --- config/application.rb | 2 +- spec/rails_helper.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/application.rb b/config/application.rb index 644e5c41352..c2187f942c9 100644 --- a/config/application.rb +++ b/config/application.rb @@ -9,7 +9,7 @@ require "action_mailer/railtie" require "action_view/railtie" -require "action_view/component" +require "view_component/engine" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 3680292e1fb..3011de2aa48 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -6,7 +6,7 @@ abort('The Rails environment is running in production mode!') if Rails.env.production? require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point! -require 'action_view/component/test_helpers' +require 'view_component/test_helpers' # Requires supporting ruby files with custom matchers and macros, etc, in # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are # run as spec files by default. This means that files in spec/support that end @@ -69,7 +69,7 @@ config.include FactoryBot::Syntax::Methods - config.include ActionView::Component::TestHelpers + config.include ViewComponent::TestHelpers, type: :component config.before { Faker::UniqueGenerator.clear }