Sha256: d0cc85d4ed918ff54cc14b18e4bd09b985ad126816799ab506490dadeb5f34ce

Contents?: true

Size: 494 Bytes

Versions: 1

Compression:

Stored size: 494 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'cachedis'
require 'rspec'

module HelperMethods
  def with_no_cache
    @cachedis.redis_instance.should_receive(:exists).exactly(1).times.and_return(nil)
  end

  def with_cache(cache)
    @cachedis.redis_instance.should_receive(:exists).exactly(1).times.and_return(true)
    @cachedis.redis_instance.should_receive(:get).exactly(1).times.and_return(cache.to_yaml)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cachedis-0.0.1 spec/spec_helper.rb