@@ -163,7 +163,7 @@ class NestedTest < ActiveSupport::TestCase
163
163
assert_equal ( "back to the same level" , response [ 0 ] . children [ 2 ] . name )
164
164
end
165
165
166
- test "correctly handles model callbacks with multiple Prism::StringNode arguments" do
166
+ test "correctly handles model callbacks with multiple string arguments" do
167
167
response = generate_document_symbols_for_source ( <<~RUBY )
168
168
class FooModel < ApplicationRecord
169
169
before_save "foo_method", "bar_method", on: :update
@@ -192,7 +192,7 @@ class FooController < ApplicationController
192
192
assert_equal ( "before_action(<anonymous>)" , response [ 0 ] . children [ 0 ] . name )
193
193
end
194
194
195
- test "correctly handles job callback with Prism::SymbolNode argument" do
195
+ test "correctly handles job callback with symbol argument" do
196
196
response = generate_document_symbols_for_source ( <<~RUBY )
197
197
class FooJob < ApplicationJob
198
198
before_perform :foo_method
@@ -205,7 +205,7 @@ class FooJob < ApplicationJob
205
205
assert_equal ( "before_perform(foo_method)" , response [ 0 ] . children [ 0 ] . name )
206
206
end
207
207
208
- test "correctly handles model callback with Prism::LambdaNode argument" do
208
+ test "correctly handles model callback with lambda argument" do
209
209
response = generate_document_symbols_for_source ( <<~RUBY )
210
210
class FooModel < ApplicationRecord
211
211
before_save -> () {}
@@ -218,7 +218,7 @@ class FooModel < ApplicationRecord
218
218
assert_equal ( "before_save(<anonymous>)" , response [ 0 ] . children [ 0 ] . name )
219
219
end
220
220
221
- test "correctly handles job callbacks with Prism::CallNode argument" do
221
+ test "correctly handles job callbacks with method call argument" do
222
222
response = generate_document_symbols_for_source ( <<~RUBY )
223
223
class FooJob < ApplicationJob
224
224
before_perform FooClass.new(foo_arg)
@@ -231,7 +231,7 @@ class FooJob < ApplicationJob
231
231
assert_equal ( "before_perform(FooClass)" , response [ 0 ] . children [ 0 ] . name )
232
232
end
233
233
234
- test "correctly handles controller callbacks with Prism::ConstantReadNode argument" do
234
+ test "correctly handles controller callbacks with constant argument" do
235
235
response = generate_document_symbols_for_source ( <<~RUBY )
236
236
class FooController < ApplicationController
237
237
before_action FooClass
@@ -244,7 +244,7 @@ class FooController < ApplicationController
244
244
assert_equal ( "before_action(FooClass)" , response [ 0 ] . children [ 0 ] . name )
245
245
end
246
246
247
- test "correctly handles model callbacks with Prism::ConstantPathNode argument" do
247
+ test "correctly handles model callbacks with namespaced constant argument" do
248
248
response = generate_document_symbols_for_source ( <<~RUBY )
249
249
class FooModel < ApplicationRecord
250
250
before_save Foo::BarClass
@@ -305,7 +305,7 @@ class FooModel < ApplicationRecord
305
305
assert_equal ( "validate(Foo::BarClass)" , response [ 0 ] . children [ 5 ] . name )
306
306
end
307
307
308
- test "correctly handles validates method with Prism::StringNode and Prism::SymbolNode argument types" do
308
+ test "correctly handles validates method with string and symbol argument types" do
309
309
response = generate_document_symbols_for_source ( <<~RUBY )
310
310
class FooModel < ApplicationRecord
311
311
validates "foo_arg", :bar_arg
@@ -319,7 +319,7 @@ class FooModel < ApplicationRecord
319
319
assert_equal ( "validates(bar_arg)" , response [ 0 ] . children [ 1 ] . name )
320
320
end
321
321
322
- test "correctly handles validates_each method with Prism::StringNode and Prism::SymbolNode argument types" do
322
+ test "correctly handles validates_each method with string and symbol argument types" do
323
323
response = generate_document_symbols_for_source ( <<~RUBY )
324
324
class FooModel < ApplicationRecord
325
325
validates_each "foo_arg", :bar_arg do
@@ -335,7 +335,7 @@ class FooModel < ApplicationRecord
335
335
assert_equal ( "validates_each(bar_arg)" , response [ 0 ] . children [ 1 ] . name )
336
336
end
337
337
338
- test "correctly handles validates_with method with Prism::ConstantReadNode and Prism::ConstantPathNode argument types" do
338
+ test "correctly handles validates_with method with constant and namespaced constant argument types" do
339
339
response = generate_document_symbols_for_source ( <<~RUBY )
340
340
class FooModel < ApplicationRecord
341
341
validates_with FooClass, Foo::BarClass
0 commit comments