Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lib/quickdraw/basic_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,19 @@ def refute(value, ...)
# Indicate that an assertion passed successfully.
def success!
if @skip
@runner.failure!("The skipped test `#{@description}` started passing.")
test_location = @block.source_location
locations = caller_locations
location = locations.find { |it| it.path.end_with?(".test.rb") } || locations.first

@runner.failure!({
"class_name" => self.class.name,
"test_path" => test_location[0],
"test_line" => test_location[1],
"description" => @description,
"message" => "The skipped test `#{@description}` started passing. Remove `skip: true` to re-enable it.",
"path" => location.path,
"line" => location.lineno,
})
else
@runner.success!(@description)
end
Expand Down
Loading