Sha256: ed71cb3488c9d029c10f972decbfb3f7d5e6868c1b30fd6d5e9886256e0dd6e8

Contents?: true

Size: 796 Bytes

Versions: 21

Compression:

Stored size: 796 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

require 'redis/objects'
Redis::Objects.redis = REDIS_HANDLE

$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../redis-namespace/lib')
begin
  require 'redis/namespace'

  describe 'Redis::Namespace compat' do
    it "tests the compatibility of Hash and ::Hash conflicts" do
      ns = Redis::Namespace.new("resque", :redis => REDIS_HANDLE)
      ns.instance_eval { rem_namespace({"resque:x" => nil}) }.should == {"x"=>nil}
      class Foo
        include Redis::Objects
      end
      ns.instance_eval { rem_namespace({"resque:x" => nil}) }.should == {"x"=>nil}
    end
  end

rescue LoadError
  # Redis::Namespace not installed
  puts "Skipping Redis::Namespace tests as redis-namespace is not installed"
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
redis-objects-2.0.0.beta spec/redis_namespace_compat_spec.rb
redis-objects-2.0.0.alpha spec/redis_namespace_compat_spec.rb
redis-objects-1.7.0 spec/redis_namespace_compat_spec.rb
redis-objects-1.6.0 spec/redis_namespace_compat_spec.rb
redis-objects-legacy-1.6.0 spec/redis_namespace_compat_spec.rb
redis-objects-1.5.1 spec/redis_namespace_compat_spec.rb
redis-objects-1.5.0 spec/redis_namespace_compat_spec.rb
redis-objects-1.4.3 spec/redis_namespace_compat_spec.rb
redis-objects-1.4.2 spec/redis_namespace_compat_spec.rb
redis-objects-1.4.0 spec/redis_namespace_compat_spec.rb
redis-objects-1.3.1 spec/redis_namespace_compat_spec.rb
redis-objects-1.3.0 spec/redis_namespace_compat_spec.rb
redis-objects-1.2.1 spec/redis_namespace_compat_spec.rb
redis-objects-1.2.0 spec/redis_namespace_compat_spec.rb
redis-objects-1.1.0 spec/redis_namespace_compat_spec.rb
redis-objects-1.0.1 spec/redis_namespace_compat_spec.rb
redis-objects-1.0.0 spec/redis_namespace_compat_spec.rb
redis-objects-0.9.1 spec/redis_namespace_compat_spec.rb
redis-objects-0.9.0 spec/redis_namespace_compat_spec.rb
redis-objects-0.8.0 spec/redis_namespace_compat_spec.rb