File tree Expand file tree Collapse file tree 4 files changed +145
-116
lines changed
Expand file tree Collapse file tree 4 files changed +145
-116
lines changed Original file line number Diff line number Diff line change 5858 ] @name
5959 (#set! "kind" "Module")) @symbol
6060
61- ; For Rspec, Rake, and Shoulda
61+ ; For Rspec and Rake
6262(call
6363 method: (identifier) @method @name
6464 (#any-of? @method
6565 "describe" "it" "before" "after" ; Rspec
66- "namespace" "task" "multitask" "file" ; Rake
67- "setup" "teardown" "should" "should_not" "should_eventually" "context")
68- ; Shoulda
66+ "namespace" "task" "multitask" "file"; Rake
67+ )
6968 arguments: (argument_list
7069 [
7170 (string
7978 ])
8079 (call) @name
8180 ])?
81+ block: (_)
82+ (#set! "kind" "Method")) @symbol @selection
83+
84+ ; Rake and Shoulda
85+ (call
86+ method: (identifier) @method @name
87+ (#any-of? @method "setup" "teardown"; Shoulda
88+ )
89+ (#set! "kind" "Method")) @symbol @selection
90+
91+ (call
92+ method: (identifier) @method @name
93+ (#any-of? @method "task" ; Rake
94+ "should" "should_not" "should_eventually" "context"; Shoulda
95+ )
96+ arguments: (argument_list
97+ [
98+ (string
99+ (string_content) @name )
100+ (simple_symbol) @name
101+ (pair
102+ key: [
103+ (string
104+ (string_content) @name )
105+ (hash_key_symbol) @name
106+ ])
107+ (call) @name
108+ ]?)
82109 (#set! "kind" "Method")) @symbol @selection
You can’t perform that action at this time.
0 commit comments