Module: ChefSpec::Cacher

Defined in:

lib/chefspec/cacher.rb

Overview

The cacher module allows for ultra-fast tests by caching the results of a
CCR in memory across an example group. In testing, this can reduce the
total testing time by a factor of 10x. This strategy is not the
default behavior, because it has implications surrounding stubbing and is
not threadsafe!

The credit for this approach and code belongs to Juri Timošin (DracoAter).
Please see his original blog post below for an in-depth explanation of how
and why this approach is faster.