Sha256: 6298cbe4e359e0007ff889778a8b226bbbb44b01a0342e038780fdbcce9b777b

Contents?: true

Size: 739 Bytes

Versions: 28

Compression:

Stored size: 739 Bytes

Contents

require 'spec_helper'
module IcalImporter
  describe Collector do
    let(:events) { [] }
    subject { Collector.new events }
    it { should respond_to :collect }

    describe "#collect" do
      let(:events) { [stub, stub] }
      let(:r_builder) { stub(:build => stub(:built_events => [])) }
      it "tries to build, then cleanup the returns" do
        built = stub
        RecurrenceEventBuilder.should_receive(:new).and_return r_builder
        Builder.should_receive(:new).with(events[0], r_builder).ordered.and_return(built)
        Builder.should_receive(:new).with(events[1], r_builder).ordered.and_return(built)
        built.should_receive(:build).twice.and_return "boom"
        subject.collect
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ical_importer-0.5.1 spec/ical_importer/collector_spec.rb
ical_importer-0.5.0 spec/ical_importer/collector_spec.rb
ical_importer-0.4.0 spec/ical_importer/collector_spec.rb
ical_importer-0.3.0 spec/ical_importer/collector_spec.rb
ical_importer-0.2.0 spec/ical_importer/collector_spec.rb
ical_importer-0.1.3 spec/ical_importer/collector_spec.rb
ical_importer-0.1.2 spec/ical_importer/collector_spec.rb
ical_importer-0.1.1 spec/ical_importer/collector_spec.rb
ical_importer-0.1.0 spec/ical_importer/collector_spec.rb
ical_importer-0.0.19 spec/ical_importer/collector_spec.rb
ical_importer-0.0.18 spec/ical_importer/collector_spec.rb
ical_importer-0.0.17 spec/ical_importer/collector_spec.rb
ical_importer-0.0.16 spec/ical_importer/collector_spec.rb
ical_importer-0.0.15 spec/ical_importer/collector_spec.rb
ical_importer-0.0.14 spec/ical_importer/collector_spec.rb
ical_importer-0.0.13 spec/ical_importer/collector_spec.rb
ical_importer-0.0.12 spec/ical_importer/collector_spec.rb
ical_importer-0.0.11 spec/ical_importer/collector_spec.rb
ical_importer-0.0.10 spec/ical_importer/collector_spec.rb
ical_importer-0.0.9 spec/ical_importer/collector_spec.rb