Flowdock
method

found_step

Importance_0
found_step(type, description, failed, pending, *args) private

No documentation

This method has no description. You can help the RSpec community by adding new notes.

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
Register or log in to add new notes.