类: RSpec::Core::Notifications::FailedExampleNotification
- 继承
-
ExampleNotification
- Object
- Struct
- ExampleNotification
- RSpec::Core::Notifications::FailedExampleNotification
- 定义于
- lib/rspec/core/notifications.rb
概述
FailedExampleNotification
扩展了 ExampleNotification
,其中包含对失败或挂起的规范有用的信息。
实例属性摘要 折叠
实例方法摘要 折叠
-
#colorized_formatted_backtrace(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ Array<String>
返回失败的彩色格式化的回溯。
-
#colorized_message_lines(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ Array<String>
返回此失败的彩色行消息。
-
#description ⇒ String
示例描述。
-
#exception ⇒ Exception
示例失败。
-
#formatted_backtrace ⇒ Array<String>
返回失败的格式化的回溯。
-
#fully_formatted(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ String
以 RSpec 内置格式化程序发出的方式完全格式化失败信息。
-
#fully_formatted_lines(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ Array<string>
以 RSpec 内置格式化程序发出的方式完全格式化失败信息,按行拆分。
-
#message_lines ⇒ Array<String>
返回此失败的逐行消息。
实例属性详细信息
#example ⇒RSpec::Core::Example
当前示例
156 157 158 |
# File 'lib/rspec/core/notifications.rb', line 156 def example @example end |
实例方法详细信息
#colorized_formatted_backtrace(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒Array<String>
返回失败的彩色格式化的回溯。
195 196 197 |
# File 'lib/rspec/core/notifications.rb', line 195 def colorized_formatted_backtrace(colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.colorized_formatted_backtrace(colorizer) end |
#colorized_message_lines(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒Array<String>
返回此失败的彩色行消息。
180 181 182 |
# File 'lib/rspec/core/notifications.rb', line 180 def (colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.(colorizer) end |
#description ⇒String
返回示例描述。
165 166 167 |
# File 'lib/rspec/core/notifications.rb', line 165 def description @exception_presenter.description end |
#exception ⇒Exception
返回示例失败。
160 161 162 |
# File 'lib/rspec/core/notifications.rb', line 160 def exception @exception_presenter.exception end |
#formatted_backtrace ⇒Array<String>
返回失败的格式化的回溯。
187 188 189 |
# File 'lib/rspec/core/notifications.rb', line 187 def formatted_backtrace @exception_presenter.formatted_backtrace end |
#fully_formatted(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒String
返回以 RSpec 内置格式化程序发出的方式完全格式化失败信息。
201 202 203 |
# File 'lib/rspec/core/notifications.rb', line 201 def fully_formatted(failure_number, colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.fully_formatted(failure_number, colorizer) end |
#fully_formatted_lines(failure_number, colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒Array<string>
返回以 RSpec 内置格式化程序发出的方式完全格式化失败信息,按行拆分。
207 208 209 |
# File 'lib/rspec/core/notifications.rb', line 207 def fully_formatted_lines(failure_number, colorizer=::RSpec::Core::Formatters::ConsoleCodes) @exception_presenter.fully_formatted_lines(failure_number, colorizer) end |
#message_lines ⇒Array<String>
返回此失败的逐行消息。
172 173 174 |
# File 'lib/rspec/core/notifications.rb', line 172 def @exception_presenter. end |