method
found_step
1.1.4 -
Show latest stable
-
0 notes -
Class: Spec::Runner::Formatter::Story::PlainTextFormatter
- 1.1.4 (0)
- 1.1.12 (0)
- 1.2.0
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
found_step(type, description, failed, pending, *args)
private
Hide source
# File lib/spec/runner/formatter/story/plain_text_formatter.rb, line 116 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 @output.print yellow(text) else @output.print(failed ? red(text) : green(text)) end if type == 'given scenario''given scenario' @previous_type = :given else @previous_type = type end end