method
found_step
![No documentation Importance_0](https://d2vfyqvduarcvs.cloudfront.net/images/importance_0.png?1349367920)
1.1.12 -
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 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