Sha256: 56e97600e6d2c26ca5dac482497a43a2858c3d6e1194b321ae451d96ce313a41
Contents?: true
Size: 573 Bytes
Versions: 9
Compression:
Stored size: 573 Bytes
Contents
require "spec_helper" describe Trifle::InitializeWithRedis do describe "#initialize" do before do @klass = Class.new do include Trifle::InitializeWithRedis end end it "should accept a redis instance" do @klass.new(Redis.new).should be_a(@klass) end it "should fail without a redis instance" do -> { @klass.new(nil) }.should raise_error(ArgumentError) end it "should accept an optional redis key" do instance = @klass.new(Redis.new, key: "foo") instance.key.should be == "foo" end end end
Version data entries
9 entries across 9 versions & 1 rubygems