Class: Reeve::Testing::Matchers::PassReeveCheck

Inherits:
Base
  • Object
show all
Defined in:
lib/reeve/testing/matchers/pass_reeve_check.rb

Overview

The escape hatch that keeps SC-009 honest: every one of the seven checks is assertable from RSpec, not only the two with names of their own.

expect(Reeve::Checks::RedactionHolds.new(tool: T, principal: alice))
.to pass_reeve_check

Instance Attribute Summary

Attributes inherited from Base

#result

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#failure_message, #initialize, #invoked_by, #matches?, #reading, #supports_block_expectations?, #with

Constructor Details

This class inherits a constructor from Reeve::Testing::Matchers::Base

Class Method Details

.checkObject



12
13
14
# File 'lib/reeve/testing/matchers/pass_reeve_check.rb', line 12

def self.check
  Checks::Base
end

Instance Method Details

#descriptionObject



16
17
18
# File 'lib/reeve/testing/matchers/pass_reeve_check.rb', line 16

def description
  "pass its reeve check"
end

#failure_message_when_negatedObject



20
21
22
# File 'lib/reeve/testing/matchers/pass_reeve_check.rb', line 20

def failure_message_when_negated
  "expected #{result.check} to fail, but it passed: #{result.message}"
end