Class: RSpec::Retryable::Payload
- Inherits:
-
Object
- Object
- RSpec::Retryable::Payload
- Defined in:
- lib/rspec/retryable/payload.rb
Instance Attribute Summary collapse
-
#example ⇒ Object
readonly
Returns the value of attribute example.
-
#notify ⇒ Object
Returns the value of attribute notify.
-
#result ⇒ Object
Returns the value of attribute result.
-
#retry ⇒ Object
Returns the value of attribute retry.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(example, state) ⇒ Payload
constructor
Default payload with: - example: RSpec example - state: Current state of the example, can be alterted by handlers - notify: default to ‘true`, if set to `false`, reporter will not be notified - result: this is the final result returned to RSpec runner - retry: default to `false`, if set to `true`, the example will be retried.
Constructor Details
#initialize(example, state) ⇒ Payload
Default payload with:
-
example: RSpec example
-
state: Current state of the example, can be alterted by handlers
-
notify: default to ‘true`, if set to `false`, reporter will not be notified
-
result: this is the final result returned to RSpec runner
-
retry: default to ‘false`, if set to `true`, the example will be retried
15 16 17 18 19 20 21 |
# File 'lib/rspec/retryable/payload.rb', line 15 def initialize(example, state) @example = example @state = state @notify = true @result = state == :failed ? false : true @retry = false end |
Instance Attribute Details
#example ⇒ Object (readonly)
Returns the value of attribute example.
6 7 8 |
# File 'lib/rspec/retryable/payload.rb', line 6 def example @example end |
#notify ⇒ Object
Returns the value of attribute notify.
7 8 9 |
# File 'lib/rspec/retryable/payload.rb', line 7 def notify @notify end |
#result ⇒ Object
Returns the value of attribute result.
7 8 9 |
# File 'lib/rspec/retryable/payload.rb', line 7 def result @result end |
#retry ⇒ Object
Returns the value of attribute retry.
7 8 9 |
# File 'lib/rspec/retryable/payload.rb', line 7 def retry @retry end |
#state ⇒ Object
Returns the value of attribute state.
7 8 9 |
# File 'lib/rspec/retryable/payload.rb', line 7 def state @state end |