We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1709218 commit ee61d8fCopy full SHA for ee61d8f
1 file changed
lib/quickdraw/basic_test.rb
@@ -53,7 +53,19 @@ def refute(value, ...)
53
# Indicate that an assertion passed successfully.
54
def success!
55
if @skip
56
- @runner.failure!("The skipped test `#{@description}` started passing.")
+ test_location = @block.source_location
57
+ locations = caller_locations
58
+ location = locations.find { |it| it.path.end_with?(".test.rb") } || locations.first
59
+
60
+ @runner.failure!({
61
+ "class_name" => self.class.name,
62
+ "test_path" => test_location[0],
63
+ "test_line" => test_location[1],
64
+ "description" => @description,
65
+ "message" => "The skipped test `#{@description}` started passing. Remove `skip: true` to re-enable it.",
66
+ "path" => location.path,
67
+ "line" => location.lineno,
68
+ })
69
else
70
@runner.success!(@description)
71
end
0 commit comments