Skip to content

class Log::EntriesChecker
inherits Reference

DSL for Log.capture

Class methods

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

View source

Methods

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

Validates that at some point the indicated entry was emitted

View source

#check(level : Severity, pattern : Regex, file = __FILE__, line = __LINE__) : self

Validates that at some point the indicated entry was emitted

View source

#clear

Clears the emitted entries so far

View source

#empty(file = __FILE__, line = __LINE__)

Validates that there are no outstanding entries

View source

#entry : Entry

Returns the last entry matched by #check or #next

View source

#entry? : Entry?

Returns the last entry matched by #check or #next

View source

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

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

View source

#next(level : Severity, pattern : Regex, file = __FILE__, line = __LINE__) : self

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

View source