Closed thomthom closed 3 years ago
Btw, my project's Gemfile
:
source "https://rubygems.org"
# Specify your gem's dependencies in pluckstr.gemspec
gemspec
group :development do
gem "rake", "~> 12.0"
gem "solargraph"
gem "yard"
end
group :test do
gem "minitest", "~> 5.0"
gem "minitest-reporters"
end
And I have run bundle install
and bundle update
to ensure gems are available.
Same here. Fails with minitest, works fine with rspec.
$EXT_DIR
should resolve to ~/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.7.1/ruby
so you can try that command in your terminal and see what the full error message is:
EXT_DIR=~/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.7.1/ruby
bundle exec rake -R $EXT_DIR vscode:minitest:list
Here is my results:
C:\Users\Thomas\Source\pluckstr>set EXT_DIR=C:/Users/Thomas/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.7.1/ruby
C:\Users\Thomas\Source\pluckstr>bundle exec rake -R %EXT_DIR% vscode:minitest:list
rake aborted!
NoMethodError: undefined method `gsub' for nil:NilClass
C:/Users/Thomas/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.7.1/ruby/vscode/minitest/tests.rb:19:in `load_files'
C:/Users/Thomas/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.7.1/ruby/vscode/minitest/tests.rb:6:in `all'
C:/Users/Thomas/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.7.1/ruby/vscode/minitest.rb:25:in `list'
C:/Users/Thomas/.vscode/extensions/connorshea.vscode-ruby-test-adapter-0.7.1/ruby/vscode.rake:8:in `block (3 levels) in <top (required)>'
Tasks: TOP => vscode:minitest:list
(See full trace by running task with --trace)
(And the path for EXT_DIR
does exist)
I also noticed this issue during working with debug test feature in PR #51. These two commits: a4e3264, 9c4665f helps me to solve problem with minitests for Windows. Maybe it will be helpful for anybody else :).
Your environment
vscode-ruby-test-adapter
version: 0.7.1Expected behavior
Expected the extension to detect and display the Minitest tests of the project.
Actual behavior
Getting error message notification:
Am I reading the message right in that the VSCode extension injecting a rake task to collect info? And it's somehow failing to load/register this Rake task?
Any suggestions on what I can do to further track this down?