On expected error Step is not stoped with Failed state
romansivak opened this issue · 1 comments
romansivak commented
Scenario:
- Start test
- Start step
- Run filed assertion in scope of the step
Expected result:
- Step and Test are failed
Actual result:
- Test is failed, Step is broken.
As workaround I've over override method:
module AllureRspec
class RSpecFormatter
def update_test_proc(result)
Allure::ResultUtils.status_details(result.exception).then do |status_detail|
proc do |test_case|
step = test_case.steps.last
if step != nil
update_proc(step, status_detail, result)
end
update_proc(test_case, status_detail, result)
end
end
end
private
def update_proc(proc, status_detail, result)
proc.stage = Allure::Stage::FINISHED
proc.status = status(result)
proc.status_details.message = status_detail.message
proc.status_details.trace = status_detail.trace
end
end
end
andrcuns commented
Could You please add a minimal rspec test example that reproduces the issue?