SusSourceSusBeTruthy

module BeTruthy

Represents a predicate that checks if the subject is truthy.

Definitions

def self.print(output)

Print a representation of this predicate.

Signature

parameter output Output

The output target.

Implementation

def self.print(output)
	output.write("be truthy")
end

def self.call(assertions, subject)

Evaluate this predicate against a subject.

Signature

parameter assertions Assertions

The assertions instance to use.

parameter subject Object

The subject to evaluate.

Implementation

def self.call(assertions, subject)
	assertions.nested(self) do |assertions|
		assertions.assert(subject, self)
	end
end