Skip to content

Commit

Permalink
Add Minitest setup code for VSCode Ruby Test Explorer
Browse files Browse the repository at this point in the history
Not very sure what is happening…
  • Loading branch information
soutaro committed Jul 18, 2022
1 parent 2103e49 commit f5f805f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
require "bundler/gem_tasks"
require "rake/testtask"

if ENV["VSCODE_CWD"]
require "minitest"
Minitest.seed = Time.now.to_i
end

Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
Expand Down
4 changes: 4 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
require 'minitest/slow_test'
require 'rbconfig'

unless Minitest.seed
Minitest.seed = Time.now.to_i
end

require_relative "lsp_double"

Minitest::SlowTest.long_test_time = 5
Expand Down

0 comments on commit f5f805f

Please sign in to comment.