Sha256: b7868aa8418d1747d299c28a5f9bc6648f7ed2848ff14328761cb86346fa1c78
Contents?: true
Size: 633 Bytes
Versions: 6
Compression:
Stored size: 633 Bytes
Contents
require 'spec_helper' describe "Exchange::Cache::NoCache" do subject { Exchange::Cache::NoCache } before(:all) do Exchange.configuration = Exchange::Configuration.new { |c| c.cache = { :subclass => :no_cache } } end after(:all) do Exchange.configuration.reset end describe "cached" do it "should directly call the block" do subject.cached('API_CLASS') { 'something' }.should == 'something' end it "should raise an error if no block was given" do lambda { subject.cached('API_CLASS') }.should raise_error(Exchange::Cache::CachingWithoutBlockError) end end end
Version data entries
6 entries across 6 versions & 1 rubygems