Parent

Included Modules

Class/Module Index [+]

Quicksearch

RSpec::Core::Example::ExecutionResult

Represents the result of executing an example. Behaves like a hash for backwards compatibility.

Attributes

exception[RW]

@return [Exception, nil] The failure, if there was one.

finished_at[RW]

@return [Time] When the example finished.

pending_exception[RW]

@return [Exception, nil] The exception triggered while

executing the pending example. If no exception was triggered
it would no longer get a status of `:pending` unless it was
tagged with `:skip`.
pending_fixed[RW]

@return [Boolean] For examples tagged with `:pending`,

this indicates whether or not it now passes.
pending_fixed?[RW]

@return [Boolean] For examples tagged with `:pending`,

this indicates whether or not it now passes.
pending_message[RW]

@return [String, nil] The reason the example was pending,

or nil if the example was not pending.
run_time[RW]

@return [Float] How long the example took in seconds.

started_at[RW]

@return [Time] When the example started.

status[RW]

@return [Symbol] `:passed`, `:failed` or `:pending`.

Public Instance Methods

record_finished(status, finished_at) click to toggle source

@api private Records the finished status of the example.

# File lib/rspec/core/example.rb, line 425
def record_finished(status, finished_at)
  self.status      = status
  self.finished_at = finished_at
  self.run_time    = (finished_at - started_at).to_f
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.