Closed nadnoslen closed 1 year ago
The problem is that vscode:minitest:list tries to get list of defined tests calling Minitest::Test.runnable_methods, which depends on seed for random shuffling. If seed is nil srand throws an exception. Usually Minitest sets seed when CLI options parsed, but that step is skipped here.
My simple workaround is to ensure that seed is set in test_helper.rb
Minitest.seed ||= 0
Get the heck out of here @SergeyBurtsev!!! That's awesome. Thank you for the tip. I'll try it out immediately!!
Released a new version of the extension with this fix, thanks :)
Your environment
vscode-ruby-test-adapter
version: v0.9.0Expected behaviour
Typically a few seconds pass and my tests load. When they don't it is usually because I have a
rake
error...e.g. my postgres container isn't running the app's database. At this point I'd start the database and perform a VS CodeDeveloper: Reload Window
.Actual behaviour
In my case, I have two separate Rails applications who are suddenly failing to list tests even when everything seems to be working. I do have some rake noise where some Ruby/Rails trace/deprecation messages are appearing but they are in no way producing a non-zero error code preventing the
vscode:minitest:list
command from succeeding.Here are the log messages from the extension; note the no implicit conversion of nil into Integer ... I'm seeing this in multiple projects.