Class: RSpec::Risky::UnknownTestConfig
- Inherits:
-
RuleConfig
- Object
- RuleConfig
- RSpec::Risky::UnknownTestConfig
- Defined in:
- lib/rspec/risky/configuration.rb,
sig/rspec/risky.rbs
Constant Summary
Constants inherited from RuleConfig
Instance Attribute Summary collapse
-
#adapters ⇒ Array[untyped]
Returns the value of attribute adapters.
-
#count_mocks ⇒ Boolean
Returns the value of attribute count_mocks.
Attributes inherited from RuleConfig
Instance Method Summary collapse
- #adapter_count(example) ⇒ Integer
-
#initialize ⇒ UnknownTestConfig
constructor
A new instance of UnknownTestConfig.
Constructor Details
#initialize ⇒ UnknownTestConfig
Returns a new instance of UnknownTestConfig.
55 56 57 58 59 |
# File 'lib/rspec/risky/configuration.rb', line 55 def initialize super @adapters = [] @count_mocks = true end |
Instance Attribute Details
#adapters ⇒ Array[untyped]
Returns the value of attribute adapters.
53 54 55 |
# File 'lib/rspec/risky/configuration.rb', line 53 def adapters @adapters end |
#count_mocks ⇒ Boolean
Returns the value of attribute count_mocks.
53 54 55 |
# File 'lib/rspec/risky/configuration.rb', line 53 def count_mocks @count_mocks end |
Instance Method Details
#adapter_count(example) ⇒ Integer
61 62 63 64 65 66 67 |
# File 'lib/rspec/risky/configuration.rb', line 61 def adapter_count(example) adapters.sum do |adapter| Integer(adapter.call(example)) rescue StandardError 0 end end |