class

Log::EntriesChecker

Inherits Reference / Object

DSL for Log.capture

Constructors

new(entries : Array(Log::Entry))
Source

Instance methods

check(level : Severity, message : String, file : String = __FILE__, line : Int32 = __LINE__) : self

Validates that at some point the indicated entry was emitted

Source
check(level : Severity, pattern : Regex, file : String = __FILE__, line : Int32 = __LINE__, *, options : Regex::MatchOptions = Regex::MatchOptions::None) : self

Validates that at some point the indicated entry was emitted

Source
clear

Clears the emitted entries so far

Source
empty(file : String = __FILE__, line : Int32 = __LINE__) : self

Validates that there are no outstanding entries

Source
entry

Returns the last entry matched by #check or #next

Source
entry?

Returns the last entry matched by #check or #next

Source
next(level : Severity, message : String, file : String = __FILE__, line : Int32 = __LINE__) : self

Validates that the indicated entry was the next one to be emitted

Source
next(level : Severity, pattern : Regex, file : String = __FILE__, line : Int32 = __LINE__, *, options : Regex::MatchOptions = Regex::MatchOptions::None) : self

Validates that the indicated entry was the next one to be emitted

Source