类: RSpec::Core::Notifications::SkippedExampleNotification

继承
ExampleNotification 显示全部
定义于
lib/rspec/core/notifications.rb

概述

SkippedExampleNotification 扩展了 ExampleNotification,包含对跳过的规格有用的内容。

另请参阅

实例属性摘要 收起

实例方法摘要 收起

实例属性详细信息

#exampleRSpec::Core::Example

当前示例

返回值

230
231
232
# File 'lib/rspec/core/notifications.rb', line 230
def example
  @example
end

实例方法详细信息

#fully_formatted(pending_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒String

返回值 以 RSpec 内置格式器发出的方式完全格式化的待处理细节。

返回值

  • (String)

    以 RSpec 内置格式器发出的方式完全格式化的待处理细节。

235
236
237
238
239
240
241
242
243
244
245
# File 'lib/rspec/core/notifications.rb', line 235
def fully_formatted(pending_number, colorizer=::RSpec::Core::Formatters::ConsoleCodes)
  formatted_caller = RSpec.configuration.backtrace_formatter.backtrace_line(example.location)
  [
    colorizer.wrap("\n  #{pending_number}) #{example.full_description}", :pending),
    "\n     ",
    Formatters::ExceptionPresenter::PENDING_DETAIL_FORMATTER.call(example, colorizer),
    "\n",
    colorizer.wrap("     # #{formatted_caller}\n", :detail)
  ].join("")
end