module Marten::Spec

Overview

Provides helpers and tools allowing to ease the process of writing specs for Marten projects.

Defined in:

marten/spec.cr
marten/spec/client.cr

Class Method Summary

Class Method Detail

def self.clear_client : Nil #

Clears the testing client.

This method is automatically called after each spec.


[View source]
def self.clear_collected_emails : Nil #

Clears collected emails.

This method is only relevant if the current emailing backend is an instance of Marten::Emailing::Backend::Development that was initialized with collect_emails: true.

This method is automatically called after each spec.


[View source]
def self.client : Client #

Returns an instance of the testing client.

The testing client allows to issue requests to the server and obtain the associated responses. Note that this method is memoized on a per-spec basis.


[View source]
def self.flush_databases #

Flushes all the databases.

This method is automatically called after each spec.


[View source]
def self.setup_databases #

Setup all the databases by ensuring that model tables are up-to-date.

This method is automatically called before each spec suite.


[View source]