Class: Spec::Runner::Reporter::Failure

Inherits:
Object
  • Object
show all
Defined in:
lib/specjour/rspec/marshalable_rspec_failure.rb

Instance Method Summary collapse

Constructor Details

#initialize(group_description, example_description, exception) ⇒ Failure

Returns a new instance of Failure.



5
6
7
8
9
10
# File 'lib/specjour/rspec/marshalable_rspec_failure.rb', line 5

def initialize(group_description, example_description, exception)
  @example_name = "#{group_description} #{example_description}"
  @exception = MarshalableException.new(exception)
  @pending_fixed = exception.is_a?(Spec::Example::PendingExampleFixedError)
  @exception_not_met = exception.is_a?(Spec::Expectations::ExpectationNotMetError)
end

Instance Method Details

#expectation_not_met?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/specjour/rspec/marshalable_rspec_failure.rb', line 16

def expectation_not_met?
  @exception_not_met
end

#pending_fixed?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/specjour/rspec/marshalable_rspec_failure.rb', line 12

def pending_fixed?
  @pending_fixed
end