W3cubDocs

/Crystal

class Log::EntriesChecker

Overview

DSL for Log.capture

Defined in:

log/spec.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(entries : Array(Log::Entry))Source

Instance Method Detail

def check(level : Severity, message : String, file = __FILE__, line = __LINE__) : selfSource

Validates that at some point the indicated entry was emitted

def check(level : Severity, pattern : Regex, file = __FILE__, line = __LINE__) : selfSource

Validates that at some point the indicated entry was emitted

def clearSource

Clears the emitted entries so far

def empty(file = __FILE__, line = __LINE__)Source

Validates that there are no outstanding entries

def entry : EntrySource

Returns the last entry matched by #check or #next

def entry? : Entry?Source

Returns the last entry matched by #check or #next

def next(level : Severity, message : String, file = __FILE__, line = __LINE__) : selfSource

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

def next(level : Severity, pattern : Regex, file = __FILE__, line = __LINE__) : selfSource

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

© 2012–2020 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.35.1/Log/EntriesChecker.html