-
Notifications
You must be signed in to change notification settings - Fork 128
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
Add test for lsp_add_on
flag in CLI
#2101
base: main
Are you sure you want to change the base?
Conversation
lsp_add-on
flag in CLIlsp_add_on
flag in CLI
f665339
to
dd9aaad
Compare
dd9aaad
to
ffc509c
Compare
(I can split off the Mocha setup into a seperate PR if desired) |
spec/tapioca/cli_spec.rb
Outdated
class CliSpec < SpecWithProject | ||
describe "Tapioca::Cli" do | ||
before do | ||
@command_stub = mock(run: nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just my preference, but I would avoid the extra dependency and just use Minitest::Mock
here. I don't know what's the opinion for the rest of the team
As suggested by @Morriar, I'm going to try using a single spec for all the LSP behavior. |
Motivation
Part of https://github.com/Shopify/team-ruby-dx/issues/1327
Implementation
Until now, most of Tapioca tests have been integration tests. Trying to verify the new LSP behaviour using this approach will be difficult, so I suggest we should consider a more mockist-style approach.
I'm choosing to use Mocha as it's the standard for Shopify, and it allows a lot flexibility.
I intend to add some integration tests later to verify the LSP behaviour as a whole
TODO:
Tests
Indeed.