Skip to content

Commit 62c3a15

Browse files
committed
test another location
1 parent 2d63428 commit 62c3a15

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/rubocop/rspec/language/runtime_macros.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def def_runtime_node_matcher(method_name, &pattern_block)
1919
"#{predicate_method?(method_name) ? '!match.nil?' : 'match'};" \
2020
'end'
2121

22-
location = caller_locations(1, 1).first
22+
location = caller_locations(3, 1).first
23+
puts location
2324
class_eval(src, location.path, location.lineno)
2425
end
2526

@@ -34,7 +35,7 @@ def def_runtime_node_search(method_name, &pattern_block)
3435
"node.each_node.public_method(#{search_method})" \
3536
'.call(&pattern.public_method(:match, *args, &block));end'
3637

37-
location = caller_locations(1, 1).first
38+
location = caller_locations(2, 1).first
3839
class_eval(src, location.path, location.lineno)
3940
end
4041

0 commit comments

Comments
 (0)