require 'spec_helper' require 'infopark_component_cache/guards/never_consistent' describe InfoparkComponentCache::Guards::NeverConsistent do {"cache disabled" => :disable_cache, "cache enabled" => :enable_cache}.each do |context_description, macro| context context_description do self.send(macro) subject { described_class.new(double) } context "without a call to guard!" do it { is_expected.not_to be_consistent } end context "with a call to guard!" do before { subject.guard! } it { is_expected.not_to be_consistent } end end end end