Class: Fix::Set Private
- Inherits:
-
Object
- Object
- Fix::Set
- Defined in:
- lib/fix/set.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Collection of specifications.
Constant Summary collapse
- LOG_LEVELS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
The type of result.
Passed expectations can be classified as:
* `success` * `warning` * `info`
Failed expectations can be classified as:
* `failure` * `error`
%w[ none error failure warning info success ].freeze
Instance Attribute Summary collapse
-
#specs ⇒ Array
readonly
private
A list of specifications.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*contexts) ⇒ Set
constructor
private
A new instance of Set.
- #test(log_level: 5, &subject) ⇒ Object
Constructor Details
#initialize(*contexts) ⇒ Set
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Set.
43 44 45 46 |
# File 'lib/fix/set.rb', line 43 def initialize(*contexts) @specs = Doc.specs(*contexts) @passed = true end |
Instance Attribute Details
#specs ⇒ Array (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns A list of specifications.
33 34 35 |
# File 'lib/fix/set.rb', line 33 def specs @specs end |
Class Method Details
Instance Method Details
#test(log_level: 5, &subject) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/fix/set.rb', line 53 def test(log_level: 5, &subject) randomize! specs.each do |environment, location, requirement, challenges| runner = Run.new(environment, requirement, *challenges) result = runner.test(&subject) failed! if result.failed? report!(location, result, log_level: log_level) end passed? || ::Kernel.exit(false) end |