diff --git a/lib/tasks/doctor.rake b/lib/tasks/doctor.rake index 606fa319e6..c0296eb7bb 100644 --- a/lib/tasks/doctor.rake +++ b/lib/tasks/doctor.rake @@ -1,6 +1,5 @@ # frozen_string_literal: true -require_relative "../../rakelib/task_helpers" require_relative "../react_on_rails" require_relative "../react_on_rails/doctor" @@ -38,8 +37,6 @@ rescue LoadError end namespace :react_on_rails do - include ReactOnRails::TaskHelpers - desc "Diagnose React on Rails setup and configuration" task :doctor do verbose = ENV["VERBOSE"] == "true" diff --git a/spec/lib/react_on_rails/doctor_rake_task_spec.rb b/spec/lib/react_on_rails/doctor_rake_task_spec.rb index 8729579c5d..e34e979a50 100644 --- a/spec/lib/react_on_rails/doctor_rake_task_spec.rb +++ b/spec/lib/react_on_rails/doctor_rake_task_spec.rb @@ -16,6 +16,12 @@ expect(Rake::Task.task_defined?("react_on_rails:doctor")).to be true end + it "can be loaded without requiring missing task_helpers" do + # This test ensures the rake file doesn't try to require excluded files + # that would cause LoadError in packaged gems + expect { load rake_file }.not_to raise_error + end + it "can be invoked without errors" do # Mock the Doctor class to avoid actual diagnosis doctor_instance = instance_double(ReactOnRails::Doctor)