Sha256: 65328fc3173cb301f063c39c2fea3759b44e16fc4074e66d440fcbfbbce657e0
Contents?: true
Size: 931 Bytes
Versions: 22
Compression:
Stored size: 931 Bytes
Contents
require 'spec_helper' describe Picky::Sources::Wrappers::Base do before(:each) do @source = stub :source end context "with backend" do it "doesn't fail" do lambda { described_class.new(@source) }.should_not raise_error end before(:each) do @wrapper = described_class.new @source end it "delegates harvest" do @source.should_receive(:harvest).once.with :some_category @wrapper.harvest :some_category end it "delegates take_snapshot" do @source.should_receive(:take_snapshot).once.with :some_index @wrapper.take_snapshot :some_index end it "delegates connect_backend" do @source.should_receive(:connect_backend).once.with # nothing @wrapper.connect_backend end end context "without backend" do it "fails" do lambda { described_class.new }.should raise_error(ArgumentError) end end end
Version data entries
22 entries across 22 versions & 1 rubygems