method
print_step

RSpec latest stable (1.3.1)
-
0 notes -
Class: Spec::Runner::Formatter::Story::HtmlFormatter
- 1.1.4 (0)
- 1.1.12 (0)
- 1.2.0
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
print_step(klass, type, description, *args)
public
Hide source
# File lib/spec/runner/formatter/story/html_formatter.rb, line 159 def print_step(klass, type, description, *args) spans = args.map { |arg| "<span class=\"param\">#{arg}</span>" } desc_string = description.step_name arg_regexp = description.arg_regexp inner = if(type == @previous_type) "And " else "#{type.to_s.capitalize} " end i = -1 inner += desc_string.gsub(arg_regexp) { |param| spans[i+=1] } @scenario_text += " <li class=\"#{klass}\">#{inner}</li>\n" if type == 'given scenario''given scenario' @previous_type = :given else @previous_type = type end end