Class: FlakeySpecCatcher::RspecResult::RSpecFailure

Inherits:
Object
  • Object
show all
Defined in:
lib/flakey_spec_catcher/rspec_result.rb

Overview

Simple class to contain failed example data

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception_message) ⇒ RSpecFailure

Returns a new instance of RSpecFailure.



54
55
56
57
# File 'lib/flakey_spec_catcher/rspec_result.rb', line 54

def initialize(exception_message)
  @exception_message = exception_message
  @count = 1
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



52
53
54
# File 'lib/flakey_spec_catcher/rspec_result.rb', line 52

def count
  @count
end

#exception_messageObject (readonly)

Returns the value of attribute exception_message.



52
53
54
# File 'lib/flakey_spec_catcher/rspec_result.rb', line 52

def exception_message
  @exception_message
end

Instance Method Details

#add_failureObject



59
60
61
# File 'lib/flakey_spec_catcher/rspec_result.rb', line 59

def add_failure
  @count += 1
end