Flowdock
method

found_step

Importance_0
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Runner::Formatter::Story::PlainTextFormatter

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (1.1.12) is shown here.

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