Skip to content

Commit

Permalink
Make failure messages work with one process
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Jan 17, 2025
1 parent e5c5c55 commit c4f13f7
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/quickdraw/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ def run(runner)
teardown
rescue Exception => error
@runner.error!({
location: @block.source_location,
description: @description,
message: error.message,
name: error.class.name,
detailed_message: error.detailed_message,
backtrace: error.backtrace,
"location" => @block.source_location,
"description" => @description,
"message" => error.message,
"name" => error.class.name,
"detailed_message" => error.detailed_message,
"backtrace" => error.backtrace,
})
end

Expand Down Expand Up @@ -74,13 +74,13 @@ def failure!(&)
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: yield,
path: location.path,
line: location.lineno,
"class_name" => self.class.name,
"test_path" => test_location[0],
"test_line" => test_location[1],
"description" => @description,
"message" => yield,
"path" => location.path,
"line" => location.lineno,
})
end

Expand Down

0 comments on commit c4f13f7

Please sign in to comment.