You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RSpec.shared_examples'to be included'doit'adds two numbers together'doexpect(subject).toeq(1)endend
require_relative'./shared_examples'RSpec.describe'Failing Group'dosubject{2}it_behaves_like'to be included'endRSpec.describe'Passing Group'dosubject{1}it_behaves_like'to be included'end
Error messages
No response
Neotest logs
Nothing logged
Describe the bug
Expected
When running a shared example test in which only 1 result passes as above, I should see 1 pass and 1 fail in the UI/summary/etc.
Actual
Instead the whole file fails in neovim only. I've inspected the JSON output and there's nothing obvious there, so as you're more of a domain expert I'll have to defer to you 😄
Reproduce the bug
Apply the below diff
diff --git a/spec/included_examples/included_examples_spec.rb b/spec/included_examples/included_examples_spec.rb
index 1d08318..305e84b 100644
--- a/spec/included_examples/included_examples_spec.rb+++ b/spec/included_examples/included_examples_spec.rb@@ -1,5 +1,11 @@-require_relative "./shared_examples"+require_relative './shared_examples'-RSpec.describe 'Included Examples' do+RSpec.describe 'Failing Group' do+ subject { 2 }+ it_behaves_like 'to be included'+end++RSpec.describe 'Passing Group' do+ subject { 1 }
it_behaves_like 'to be included'
end
diff --git a/spec/included_examples/shared_examples.rb b/spec/included_examples/shared_examples.rb
index fcb21e8..8671a42 100644
--- a/spec/included_examples/shared_examples.rb+++ b/spec/included_examples/shared_examples.rb@@ -1,5 +1,5 @@
RSpec.shared_examples 'to be included' do
it 'adds two numbers together' do
- expect(2+2).to eq(4)+ expect(subject).to eq(1)
end
end
Open nvim
Run the whole file in rspec
Final checks
I have made sure this issue exists in the latest version of the plugin
I have tested with the minimal.lua config file above and still get the issue
I have confirmed that Treesitter is working correctly by running :checkhealth treesitter
I have made sure this is not a duplicate issue
The text was updated successfully, but these errors were encountered:
RSpec test
Error messages
No response
Neotest logs
Nothing logged
Describe the bug
Expected
When running a shared example test in which only 1 result passes as above, I should see 1 pass and 1 fail in the UI/summary/etc.
Actual
Instead the whole file fails in neovim only. I've inspected the JSON output and there's nothing obvious there, so as you're more of a domain expert I'll have to defer to you 😄
Reproduce the bug
Final checks
minimal.lua
config file above and still get the issue:checkhealth treesitter
The text was updated successfully, but these errors were encountered: