Sha256: cb465b27eadf44614e5ae0ceb8afbc91e9b034578ea40204bd915a246af6ac36
Contents?: true
Size: 1.79 KB
Versions: 2
Compression:
Stored size: 1.79 KB
Contents
require 'spec_helper' describe Flume::Logger do let(:logger) { Flume::Logger.new } let(:logdev) { double } let(:sentinel) { double } before do logger.stub(:logdev) { logdev } end it "delegates #redis to its logdev" do logdev.stub(:redis => sentinel) expect(logger.redis).to eql sentinel end it "delegates #redis= to its logdev" do expect(logdev).to receive(:redis=).with(sentinel) logger.redis = sentinel end it "delegates #list to its logdev" do logdev.stub(:list => sentinel) expect(logger.list).to eql sentinel end it "delegates #list= to its logdev" do expect(logdev).to receive(:list=).with(sentinel) logger.list = sentinel end it "delegates #cap to its logdev" do logdev.stub(:cap => sentinel) expect(logger.cap).to eql sentinel end it "delegates #cap= to its logdev" do expect(logdev).to receive(:cap=).with(sentinel) logger.cap = sentinel end it "delegates #step to its logdev" do logdev.stub(:step => sentinel) expect(logger.step).to eql sentinel end it "delegates #step= to its logdev" do expect(logdev).to receive(:step=).with(sentinel) logger.step = sentinel end it "delegates #cycle to its logdev" do logdev.stub(:cycle => sentinel) expect(logger.cycle).to eql sentinel end it "delegates #cycle= to its logdev" do expect(logdev).to receive(:cycle=).with(sentinel) logger.cycle = sentinel end it "delegates #tail to its logdev" do logdev.stub(:tail => sentinel) expect(logger.tail).to eql sentinel end it "delegates #truncate to its logdev" do logdev.stub(:truncate => sentinel) expect(logger.truncate).to eql sentinel end it "delegates #size to its logdev" do logdev.stub(:size => sentinel) expect(logger.size).to eql sentinel end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flume-0.0.3 | spec/lib/logger_spec.rb |
flume-0.0.2 | spec/lib/logger_spec.rb |