Sha256: 91d74456e7d3dc3d97e13fd59bb1a67e6c4e493ab0d5128eab4fd4af9a258a7c
Contents?: true
Size: 771 Bytes
Versions: 10
Compression:
Stored size: 771 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' describe 'memcached storage' do before :all do Rack::PageSpeed::Config # load all storage mechanisms @store = Rack::PageSpeed::Store::Memcached.new @client = @store.instance_variable_get(:@client) end context 'initializing' do it "errors out if it can't connect to Memcached" do expect { MemcachedStore.new('ohfoo').new }.to raise_error end end context 'writing' do it "writes with a Hash-like syntax" do @client.should_receive(:set).with('omg', 'value') @store['omg'] = "value" end end context 'reading' do it "reads with a Hash-like syntax" do @client.set 'hola', 'Hola mundo' @store['hola'].should == "Hola mundo" end end end
Version data entries
10 entries across 10 versions & 1 rubygems