Class: TestOptions
- Inherits:
-
Object
- Object
- TestOptions
- Defined in:
- lib/test_options.rb
Overview
TestOptions
Instance Method Summary collapse
- #fail_on_first_expect ⇒ Object
-
#initialize(fail_on_first_expect: nil) ⇒ TestOptions
constructor
A new instance of TestOptions.
-
#map_from_parent(parent) ⇒ Object
Maps options from parent onto this instance.
Constructor Details
#initialize(fail_on_first_expect: nil) ⇒ TestOptions
Returns a new instance of TestOptions.
13 14 15 |
# File 'lib/test_options.rb', line 13 def initialize(fail_on_first_expect: nil) @fail_on_first_expect = fail_on_first_expect end |
Instance Method Details
#fail_on_first_expect ⇒ Object
6 7 8 9 10 |
# File 'lib/test_options.rb', line 6 def fail_on_first_expect return true if @fail_on_first_expect.nil? @fail_on_first_expect end |
#map_from_parent(parent) ⇒ Object
Maps options from parent onto this instance. If childy already has a setting, it will not be overwritten.
20 21 22 23 24 |
# File 'lib/test_options.rb', line 20 def map_from_parent(parent) return if parent.nil? @fail_on_first_expect = @fail_on_first_expect.nil? ? parent.fail_on_first_expect : @fail_on_first_expect end |