Sha256: 17df8962110321664b375837638482178f98db55a7c3d5516ff3f85f6257df2a

Contents?: true

Size: 633 Bytes

Versions: 8

Compression:

Stored size: 633 Bytes

Contents

require 'rubygems'
require 'bundler'
Bundler.setup(:default, :test)
Bundler.require(:default, :test)

require 'rspec'
require 'redis'
require 'logger'

$TESTING=true
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'redis/namespace'

def capture_stderr
  require 'stringio'
  begin
    original, $stderr = $stderr, StringIO.new
    yield
  rescue Redis::CommandError 
    # ignore Redis::CommandError for test and
    # return captured messages
    $stderr.string.chomp
  ensure
    $stderr = original
  end
end

RSpec::Matchers.define :have_key do |expected|
  match do |redis|
    redis.exists(expected)
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
redis-namespace-1.4.1 spec/spec_helper.rb
redis-namespace-1.4.0 spec/spec_helper.rb
redis-namespace-1.4.0.rc.0 spec/spec_helper.rb
redis-namespace-1.3.2 spec/spec_helper.rb
redis-namespace-1.3.1 spec/spec_helper.rb
sidekiq-statsd-0.1.1 vendor/ruby/1.9.1/gems/redis-namespace-1.3.0/spec/spec_helper.rb
sidekiq-statsd-0.1.0 vendor/ruby/1.9.1/gems/redis-namespace-1.3.0/spec/spec_helper.rb
redis-namespace-1.3.0 spec/spec_helper.rb