method
found_step
1.1.12 -
Show latest stable
- Class:
Spec::Runner::Formatter::Story::PlainTextFormatter
found_step(type, description, failed, pending, *args)private
No documentation available.
# File lib/spec/runner/formatter/story/plain_text_formatter.rb, line 168
def found_step(type, description, failed, pending, *args)
desc_string = description.step_name
arg_regexp = description.arg_regexp
text = if(type == @previous_type)
"\n And "
else
"\n\n #{type.to_s.capitalize} "
end
i = -1
text << desc_string.gsub(arg_regexp) { |param| args[i+=1] }
if pending
@scenario_body_text += yellow(text)
else
@scenario_body_text += (failed ? red(text) : green(text))
end
if type == 'given scenario''given scenario'
@previous_type = :given
else
@previous_type = type
end
end