Closed prdanelli closed 2 years ago
Interestingly, I also get no tests found when i use a normal it message block
syntax:
RSpec.describe Collections::Foodiverse::WaitlistCollectionAdvertiserService do
describe "Constants" do
it "is there" do
expect(described_class.const_defined?(:BODY_MESSAGE_KEY)).to be true
end
end
end
That's very weird. I've copied the code from your initial post and detected the test.
Obvious question, is there a Gemfile
, .rspec
or .gitignore
file present and are the tests ending in _spec.rb
?
Finally if you open /Users/{YourName}/.local/state/nvim/neotest.log
and try and run Neotest, you should see some output. Could you share that?
I also have this issue but don't have the log file you specified:
$ cat /Users/$(whoami)/.local/state/nvim/neotest.log │~
cat: /Users/pat/.local/state/nvim/neotest.log: No such file or directory
Could you check the share
dir? Wonder if I made a mistake and autocorrected to state
. I'm not at a laptop at the moment.
Also, any chance you guys could share a repo that displays this bug that I can clone and test with?
I've pushed a fix. I think the nested describe
statements were scuppering this. However I've almost certainly broken #21 and specs which have no context
I also have this problem. I'm running the commit you pushed a half hour ago.
require 'rails_helper'
RSpec.describe User, type: :model do
it 'works' do
expect(1).to be_a(Numeric)
end
end
Then run:
:lua require('neotest').run.run()
No tests found
I just can't recreate these No tests found
unfortunately. If I plug your code into the playground with the treesitter queries I get the expected outcome:
@natematykiewicz - Can you share any more details about the repo or the test itself? Can you enable debugging in Neotest and share the outputs of /Users/Oli/.local/state/nvim/neotest.log
?
I somehow didn't have the ruby treesitter installed even though I did the other day. TSInstall ruby
fixed my problem. Sorry to bother you.
Is there a way for it to realize you don't have the Ruby TreeSitter installed and suggest to you the right command to run to install it? Because that'd be an awesome UX.
Is there a way for it to realize you don't have the Ruby TreeSitter installed and suggest to you the right command to run to install it? Because that'd be an awesome UX.
I'm sure there is but I imagine it would be messy to check if it's installed depending on the user OS etc. I should add an issue template which asks the user to run checkhealth
instead.
@prdanelli - Any luck at trying the latest commit?
I think the issues I was having might have been around naming the file "test.rb" the renaming it "test_spec.rb" and trying to run the tests before reopening the file. I've tested that scenario and it works perfectly now.
Appreciate the feedback thanks. I will update the readme at some point to save others some time
I somehow didn't have the ruby treesitter installed even though I did the other day.
TSInstall ruby
fixed my problem. Sorry to bother you.
This resolved my issue as well even though I had it listed in my 'ensure_installed' section.
@prdanelli 's suggestion fixed my issue. This seems like something that'd be good to mention in the README somewhere. Granted not many people probably have spec files that don't end in _spec.rb
, but still
Thanks for the prompt. I've updated the readme to reflect this.
Hello, I'm seeing a No Tests Found message for the following spec:
Running rspec via the terminal results in:
Do you know if there is support for the short
it
syntax?I'm using Neovim nightly and the latest version of the plugin.
Thank you again for the time you've put in to developing this plugin, I use it pretty much every day.