Skip to content

Commit 8bb486c

Browse files
committed
Add all supported matchers through RSpec 3.13
1 parent 556d6d2 commit 8bb486c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

RSpec.sublime-syntax

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ scope: source.ruby.rspec
99

1010
extends: Packages/Ruby/Ruby.sublime-syntax
1111

12+
variables:
13+
# Updated list as of rspec-expectations@3.13.5
14+
matchers: (?:contain|include|be)_?[^\s\(]*|eql?|(?:have|yield)_[^\s\(]*|raise_error|render_template|redirect_to|match_array|send_email|change|match|start_with|end_with|respond_to|exist|throw_symbol|cover|satisfy|output
15+
1216
contexts:
1317
main:
1418
- match: '(?<!\.)\b(before|after|around|shared_examples|shared_context|it_behaves_like|include_examples|it_should_behave_like|it_has_behavior)\b(?![?!])'
@@ -56,7 +60,7 @@ contexts:
5660
- include: expressions
5761

5862
expectation:
59-
- match: '\.(to|not_to)\s*((contain|include|be)_?[^\s\(]*|eql?|have_[^\s\(]*|raise_error|render_template|redirect_to|match_array|send_email)'
63+
- match: '\.(to|not_to)\s*({{matchers}})'
6064
captures:
6165
1: keyword.other.rspec.expectation
6266
2: keyword.other.rspec.expectation

0 commit comments

Comments
 (0)