Sha256: 502e57cd82705205a5ae3bc9d6b93c97d896b480a5a5a69ef1b3246b4dc14282
Contents?: true
Size: 819 Bytes
Versions: 19
Compression:
Stored size: 819 Bytes
Contents
# -*- coding: utf-8 -*- require 'turnip_formatter/scenario' require 'turnip_formatter/step/failure' module TurnipFormatter module Scenario class NotFailedScenarioError < ::StandardError; end class NoExistFailedStepInformationError < ::StandardError; end class Failure include TurnipFormatter::Scenario def steps steps = super steps[offending_line].extend TurnipFormatter::Step::Failure steps end def validation raise NotFailedScenarioError if status != 'failed' offending_line super end private def offending_line unless example.exception.backtrace.last =~ /:in step:(?<stepno>\d+) `/ raise NoExistFailedStepInformationError end $~[:stepno].to_i end end end end
Version data entries
19 entries across 19 versions & 1 rubygems