Commit 9c5b1f1
authored
Fix SpecStyle to not receive Prism events (#71)
* Calling super will still register for events
The parent class TestDiscovery also registers SpecStyle for Prism event. While handling the events it tries to access a nil variable when entering a class or module and thus completely break code analysis of normal ruby files.
* Added a test to verify expected SpecStyle patch behavior
* Added integration test to verify parsing of a simple ruby file
The improperly patched SpecStyle would fail when the Ruby LSP was
handling a 'textDocument/foldingRange' message (probably others too)
for a source while with module and class blocks as it was still
receiving events from Prism (which we do not want) for the RSpec
addon.1 parent 3ac0633 commit 9c5b1f1
File tree
3 files changed
+41
-1
lines changed- lib/ruby_lsp/ruby_lsp_rspec
- spec
3 files changed
+41
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
46 | 77 | | |
47 | 78 | | |
48 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments