Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganise Ruby tests #375

Merged
merged 3 commits into from
Dec 11, 2024
Merged

Reorganise Ruby tests #375

merged 3 commits into from
Dec 11, 2024

Conversation

grodowski
Copy link
Member

Reorganise to run minitests with rake and enable a few neat things:

  • run a single test file, thanks to the absence of main.rb
  • ruby-lsp goodness in Code: run/debug single test and test explorer
Screenshot 2024-12-06 at 11 24 40

FWIW I wanted to do the same for golang, but the current Go extension for Code requires 1.19+, so a go update may be due in a separate PR. Any objections to do that?

@grodowski grodowski requested review from driv3r and mtaner December 6, 2024 11:23
@driv3r
Copy link
Contributor

driv3r commented Dec 6, 2024

carve out logrus before updating golang please

.gitignore Outdated
@@ -17,7 +17,6 @@ bin/
.vagrant/
build/
.bundle/
.vscode/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we remove this from git ignore?

"program": "rake test TEST=${file}"
}
]
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please lets avoid any unnecessary IDE related staff out

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I added these only before finding out that adding rake might make sense, and now ruby-lsp runs tests just fine. Removing!

@@ -1,6 +1,6 @@
require "test_helper"

class TrivialIntegrationTests < GhostferryTestCase
class TrivialIntegrationTest < GhostferryTestCase
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL: ruby-lsp doesn't recognise test classes with plural names

@grodowski
Copy link
Member Author

grodowski commented Dec 6, 2024

Re: go update, just found #346 and it's been approved already

@grodowski grodowski requested a review from driv3r December 10, 2024 11:43
@grodowski grodowski merged commit 9118912 into main Dec 11, 2024
9 checks passed
@grodowski grodowski deleted the grodowski/reorganise-tests-vscode branch December 11, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants