Sha256: 6061a25b3a07e097f2ea010b07ce39a3e7e9e76fa5d3dea73080f0387d1d835c

Contents?: true

Size: 1.36 KB

Versions: 17

Compression:

Stored size: 1.36 KB

Contents

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

# tests whether autoload functionality works correctly; had issues previously

require 'redis/objects'
# $redis used automatically

describe 'Redis::Objects' do
  it "should autoload everything" do
    defined?(::Redis::Counter).should == "constant"
    x = Redis::Counter.new('x')
    x.class.name.should == "Redis::Counter"
    x.redis.should == REDIS_HANDLE

    defined?(::Redis::HashKey).should == "constant"
    x = Redis::HashKey.new('x')
    x.class.name.should == "Redis::HashKey"
    x.redis.should == REDIS_HANDLE

    defined?(::Redis::List).should == "constant"
    x = Redis::List.new('x')
    x.class.name.should == "Redis::List"
    x.redis.should == REDIS_HANDLE

    defined?(::Redis::Lock).should == "constant"
    x = Redis::Lock.new('x')
    x.class.name.should == "Redis::Lock"
    x.redis.should == REDIS_HANDLE

    defined?(::Redis::Set).should == "constant"
    x = Redis::Set.new('x')
    x.class.name.should == "Redis::Set"
    x.redis.should == REDIS_HANDLE

    defined?(::Redis::SortedSet).should == "constant"
    x = Redis::SortedSet.new('x')
    x.class.name.should == "Redis::SortedSet"
    x.redis.should == REDIS_HANDLE

    defined?(::Redis::Value).should == "constant"
    x = Redis::Value.new('x')
    x.class.name.should == "Redis::Value"
    x.redis.should == REDIS_HANDLE
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
redis-objects-legacy-1.6.0 spec/redis_autoload_objects_spec.rb
redis-objects-1.5.1 spec/redis_autoload_objects_spec.rb
redis-objects-1.5.0 spec/redis_autoload_objects_spec.rb
redis-objects-1.4.3 spec/redis_autoload_objects_spec.rb
redis-objects-1.4.2 spec/redis_autoload_objects_spec.rb
redis-objects-1.4.0 spec/redis_autoload_objects_spec.rb
redis-objects-1.3.1 spec/redis_autoload_objects_spec.rb
redis-objects-1.3.0 spec/redis_autoload_objects_spec.rb
redis-objects-1.2.1 spec/redis_autoload_objects_spec.rb
redis-objects-1.2.0 spec/redis_autoload_objects_spec.rb
redis-objects-1.1.0 spec/redis_autoload_objects_spec.rb
redis-objects-1.0.1 spec/redis_autoload_objects_spec.rb
redis-objects-1.0.0 spec/redis_autoload_objects_spec.rb
redis-objects-0.9.1 spec/redis_autoload_objects_spec.rb
redis-objects-0.9.0 spec/redis_autoload_objects_spec.rb
redis-objects-0.8.0 spec/redis_autoload_objects_spec.rb
redis-objects-0.7.0 spec/redis_autoload_objects_spec.rb