Skip to content

Commit f7643cd

Browse files
committed
Configure fixtures
1 parent 5da75b3 commit f7643cd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/ruby_lsp/ruby_lsp_rails/server.rb

+9-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@
33

44
require "json"
55
require "open3"
6-
require "rails/test_help" # to determine the fixture_paths
6+
7+
# to determine the fixture_paths
8+
if defined?(ActiveRecord::Base)
9+
ActiveSupport.on_load(:active_support_test_case) do
10+
include ActiveRecord::TestFixtures
11+
12+
fixture_paths << "#{Rails.root}/test/fixtures/"
13+
end
14+
end
715

816
module RubyLsp
917
module Rails

0 commit comments

Comments
 (0)