Skip to content

Commit 553d5c2

Browse files
committed
Use Minitest instead of ActiveSupport for testing
1 parent 78f45b1 commit 553d5c2

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

test/ruby_lsp_rails/server_test.rb

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
# typed: true
22
# frozen_string_literal: true
33

4-
require "test_helper"
5-
6-
# Configure Rails Environment
7-
ENV["RAILS_ENV"] = "test"
8-
9-
require_relative "../dummy/config/environment"
10-
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
11-
ActiveRecord::Migrator.migrations_paths << File.expand_path("../db/migrate", __dir__)
12-
4+
require "test_helper_server"
135
require "ruby_lsp/ruby_lsp_rails/server"
146

15-
class ServerTest < Minitest::Test
7+
class ServerTest < ActiveSupport::TestCase # Minitest::Test
168
def setup
179
@stdout = StringIO.new
1810
@server = RubyLsp::Rails::Server.new(stdout: @stdout, override_default_output_device: false)

test/test_helper_server.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# typed: true
2+
# frozen_string_literal: true
3+
4+
# Configure Rails Environment
5+
ENV["RAILS_ENV"] = "test"
6+
7+
require "test_helper"
8+
9+
require_relative "../test/dummy/config/environment"
10+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
11+
ActiveRecord::Migrator.migrations_paths << File.expand_path("../db/migrate", __dir__)

0 commit comments

Comments
 (0)