Skip to content

Commit

Permalink
Configure fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
andyw8 committed Jan 20, 2025
1 parent 5da75b3 commit f7643cd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/ruby_lsp/ruby_lsp_rails/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@

require "json"
require "open3"
require "rails/test_help" # to determine the fixture_paths

# to determine the fixture_paths
if defined?(ActiveRecord::Base)
ActiveSupport.on_load(:active_support_test_case) do
include ActiveRecord::TestFixtures

fixture_paths << "#{Rails.root}/test/fixtures/"
end
end

module RubyLsp
module Rails
Expand Down

0 comments on commit f7643cd

Please sign in to comment.