Pass along end line

This commit is contained in:
Michael Miller 2021-08-17 13:49:58 -06:00
parent 67b4c0589b
commit 65799fdd3b
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD
2 changed files with 3 additions and 3 deletions

View file

@ -41,7 +41,7 @@ module Spectator::DSL
::Spectator::DSL::Builder.start_group(
_spectator_group_name(\{{what}}),
::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}),
::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}, \{{block.end_line_number}}),
metadata
)
@ -96,7 +96,7 @@ module Spectator::DSL
\%collection,
\{{collection.stringify}},
\{{block.args.empty? ? :nil.id : block.args.first.stringify}},
::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}),
::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}, \{{block.end_line_number}}),
metadata
)

View file

@ -26,7 +26,7 @@ module Spectator::DSL
{% end %}
::Spectator::DSL::Builder.{{type.id}}(
::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}})
::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}, \{{block.end_line_number}})
) do
{% if block %}
%wrapper do |*args|