Class: Thoreau::Model::TestFamily
- Inherits:
-
Object
- Object
- Thoreau::Model::TestFamily
- Defined in:
- lib/thoreau/model/test_family.rb
Instance Attribute Summary collapse
-
#asserts ⇒ Object
readonly
Returns the value of attribute asserts.
-
#desc ⇒ Object
Returns the value of attribute desc.
-
#expected_exception ⇒ Object
readonly
Returns the value of attribute expected_exception.
-
#expected_output ⇒ Object
readonly
Returns the value of attribute expected_output.
-
#focus ⇒ Object
writeonly
Sets the attribute focus.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#setups ⇒ Object
readonly
Returns the value of attribute setups.
-
#use_legacy_snapshot ⇒ Object
Returns the value of attribute use_legacy_snapshot.
Instance Method Summary collapse
- #failure_expected? ⇒ Boolean
- #focused? ⇒ Boolean
-
#initialize(asserts:, desc:, expected_exception:, expected_output:, failure_expected:, input_specs:, kind:, setups:) ⇒ TestFamily
constructor
A new instance of TestFamily.
- #input_specs ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(asserts:, desc:, expected_exception:, expected_output:, failure_expected:, input_specs:, kind:, setups:) ⇒ TestFamily
Returns a new instance of TestFamily.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/thoreau/model/test_family.rb', line 14 def initialize(asserts:, desc:, expected_exception:, expected_output:, failure_expected:, input_specs:, kind:, setups: ) @asserts = asserts @desc = desc @expected_exception = expected_exception @expected_output = expected_output @failure_expected = failure_expected @input_specs = input_specs @kind = kind @setups = setups end |
Instance Attribute Details
#asserts ⇒ Object (readonly)
Returns the value of attribute asserts.
5 6 7 |
# File 'lib/thoreau/model/test_family.rb', line 5 def asserts @asserts end |
#desc ⇒ Object
Returns the value of attribute desc.
12 13 14 |
# File 'lib/thoreau/model/test_family.rb', line 12 def desc @desc end |
#expected_exception ⇒ Object (readonly)
Returns the value of attribute expected_exception.
5 6 7 |
# File 'lib/thoreau/model/test_family.rb', line 5 def expected_exception @expected_exception end |
#expected_output ⇒ Object (readonly)
Returns the value of attribute expected_output.
5 6 7 |
# File 'lib/thoreau/model/test_family.rb', line 5 def expected_output @expected_output end |
#focus=(value) ⇒ Object (writeonly)
Sets the attribute focus
10 11 12 |
# File 'lib/thoreau/model/test_family.rb', line 10 def focus=(value) @focus = value end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
5 6 7 |
# File 'lib/thoreau/model/test_family.rb', line 5 def kind @kind end |
#setups ⇒ Object (readonly)
Returns the value of attribute setups.
5 6 7 |
# File 'lib/thoreau/model/test_family.rb', line 5 def setups @setups end |
#use_legacy_snapshot ⇒ Object
Returns the value of attribute use_legacy_snapshot.
11 12 13 |
# File 'lib/thoreau/model/test_family.rb', line 11 def use_legacy_snapshot @use_legacy_snapshot end |
Instance Method Details
#failure_expected? ⇒ Boolean
38 39 40 |
# File 'lib/thoreau/model/test_family.rb', line 38 def failure_expected? @failure_expected end |
#focused? ⇒ Boolean
42 43 44 |
# File 'lib/thoreau/model/test_family.rb', line 42 def focused? @focus end |
#input_specs ⇒ Object
33 34 35 36 |
# File 'lib/thoreau/model/test_family.rb', line 33 def input_specs @input_specs.size == 0 ? [{}] : @input_specs end |
#to_s ⇒ Object
46 47 48 |
# File 'lib/thoreau/model/test_family.rb', line 46 def to_s "#{@desc || "#{@kind} #{(@input_specs.map &:to_s).to_sentence } expect #{expected_output}"}" end |