Module: RSpec::Clone::Logger Private

Defined in:
lib/r_spec/clone/logger.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Send log messages to the console.

API:

  • private

Class Method Summary collapse

Class Method Details

.failed_spec(report) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • Failed expectation result presenter.

Raises:

  • Terminate execution immediately with message.

See Also:

API:

  • private



23
24
25
# File 'lib/r_spec/clone/logger.rb', line 23

def self.failed_spec(report)
  abort report.colored_string
end

.passed_spec(report) ⇒ nil

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Add a colored message to ‘$stdout`.

Parameters:

  • Passed expectation result presenter.

Returns:

  • Add a colored message to ‘$stdout`.

See Also:

API:

  • private



12
13
14
# File 'lib/r_spec/clone/logger.rb', line 12

def self.passed_spec(report)
  puts report.colored_string
end

.source(filename, line) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The Ruby source filename and line number containing this method or nil if this method was not defined in Ruby (i.e. native).

Parameters:

  • The Ruby source filename.

  • The Ruby source line number.

Returns:

  • The Ruby source filename and line number associated with the evaluated spec.

API:

  • private



37
38
39
# File 'lib/r_spec/clone/logger.rb', line 37

def self.source(filename, line)
  puts [filename, line].compact.join(":")
end