Exception: CaseAssay

Inherits:
EqualityAssay show all
Defined in:
lib/assay/case_assay.rb

Overview

Equality assertion using #===, the case equality method.

Constant Summary

Constants inherited from Assertion

Assertion::SIZE_LIMIT

Constants included from Assay::Assertable

Assay::Assertable::SIZE_LIMIT

Class Method Summary collapse

Methods inherited from EqualAssay

assert_message

Methods inherited from Assertion

by_name, by_operator, inherited, #initialize, name_index, operator_index, register, subclasses

Methods included from Assay::Assertable

#[], #assert!, #assert_message, #assertive_name, #assertor, #extract_options, #fail?, #operator, #pass?, #refute!, #refute_message, #standard_message

Methods inherited from Exception

#negative?, raised?, #set_negative

Constructor Details

This class inherits a constructor from Assertion

Class Method Details

.pass?(subject, criterion) ⇒ Boolean

Check assertion via #=== method.

Returns:

  • (Boolean)


12
13
14
# File 'lib/assay/case_assay.rb', line 12

def self.pass?(subject, criterion)
  subject === criterion
end