Sha256: 541f0b298ecd4c2de03e450d86675b2a6450b8e0b3c9de3f9675af4a7411f231

Contents?: true

Size: 729 Bytes

Versions: 9

Compression:

Stored size: 729 Bytes

Contents

require "spec_helper"

context "RedisStoreConfigTest" do
  before do
    Socialization.instance_eval { @redis = nil }
  end

  it "returns a new Redis object when none were specified" do
    expect(Socialization.redis).to be_a Redis
  end

  it "always returns the same Redis object when none were specified" do
    redis = Socialization.redis
    expect(Socialization.redis).to eq(redis)
  end

  it "is able to set and get a redis instance" do
    redis = Redis.new
    Socialization.redis = redis
    expect(Socialization.redis).to eq(redis)
  end

  it "always return the same Redis object when it was specified" do
    redis = Redis.new
    Socialization.redis = redis
    expect(Socialization.redis).to eq(redis)
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
socialization-2.0.2 spec/stores/redis/config_spec.rb
socialization-2.0.1 spec/stores/redis/config_spec.rb
socialization-2.0.0 spec/stores/redis/config_spec.rb
socialization-1.2.3 spec/stores/redis/config_spec.rb
socialization-1.2.2 spec/stores/redis/config_spec.rb
socialization-1.2.1 spec/stores/redis/config_spec.rb
twrk-socialization-1.2.0 spec/stores/redis/config_spec.rb
twrk-socialization-0.0.1 spec/stores/redis/config_spec.rb
socialization-1.2.0 spec/stores/redis/config_spec.rb