Class: HeapScope::RSpecMatchers::RemainHealthy
- Inherits:
-
Object
- Object
- HeapScope::RSpecMatchers::RemainHealthy
- Defined in:
- lib/heapscope/rspec.rb
Instance Method Summary collapse
Instance Method Details
#failure_message ⇒ Object
90 91 92 93 |
# File 'lib/heapscope/rspec.rb', line 90 def codes = @report.findings.map { |f| "#{f.code}/#{f.severity}" }.join(", ") "expected healthy retention profile, findings: #{codes}" end |
#matches?(proc) ⇒ Boolean
85 86 87 88 |
# File 'lib/heapscope/rspec.rb', line 85 def matches?(proc) @report = HeapScope.measure(force_gc: true) { proc.call } @report.healthy? && @report.findings.none? { |f| f.severity == :high } end |
#supports_block_expectations? ⇒ Boolean
95 96 97 |
# File 'lib/heapscope/rspec.rb', line 95 def supports_block_expectations? true end |