Sha256: b9401434121014722af80d7a5b1da702e25ef66808390ab658ad35b5de7cd482

Contents?: true

Size: 960 Bytes

Versions: 22

Compression:

Stored size: 960 Bytes

Contents

require 'spec_helper'
require 'flydata/command/start'

module Flydata
  module Command
    describe Start do
      subject { described_class.new }
      let(:sender) { double("sender") }
      let(:helper) { double("helper") }
      let(:opts) { double("opts") }

      it "should start sender and helper when no option is passed" do
        expect(Flydata::Command::Sender).to receive(:new).and_return(sender)
        expect(sender).to receive(:start)
        expect(Flydata::Command::Helper).to receive(:new).and_return(helper)
        expect(helper).to receive(:stop)
        expect(helper).to receive(:start)
        subject.run

      end

      it "should only start sender when no options are passed" do
        expect(Flydata::Command::Sender).to receive(:new).and_return(sender)
        expect(sender).to receive(:start)
        expect(opts).to receive(:skip_helper?).and_return(true)
        described_class.new(opts).run
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
flydata-0.5.17 spec/flydata/command/start_spec.rb
flydata-0.5.16 spec/flydata/command/start_spec.rb
flydata-0.5.15 spec/flydata/command/start_spec.rb
flydata-0.5.14 spec/flydata/command/start_spec.rb
flydata-0.5.13 spec/flydata/command/start_spec.rb
flydata-0.5.12 spec/flydata/command/start_spec.rb
flydata-0.5.11 spec/flydata/command/start_spec.rb
flydata-0.5.10 spec/flydata/command/start_spec.rb
flydata-0.5.9 spec/flydata/command/start_spec.rb
flydata-0.5.8 spec/flydata/command/start_spec.rb
flydata-0.5.7 spec/flydata/command/start_spec.rb
flydata-0.5.6 spec/flydata/command/start_spec.rb
flydata-0.5.5 spec/flydata/command/start_spec.rb
flydata-0.5.4 spec/flydata/command/start_spec.rb
flydata-0.5.3 spec/flydata/command/start_spec.rb
flydata-0.5.2 spec/flydata/command/start_spec.rb
flydata-0.5.1 spec/flydata/command/start_spec.rb
flydata-0.5.0 spec/flydata/command/start_spec.rb
flydata-0.4.3 spec/flydata/command/start_spec.rb
flydata-0.4.2 spec/flydata/command/start_spec.rb