Sha256: 9854deafcd60e25d1b10abb296c4c7f75e6228bc85bcafff481578eaefe303b4

Contents?: true

Size: 914 Bytes

Versions: 73

Compression:

Stored size: 914 Bytes

Contents

require 'spec_helper'
require 'flydata/command/stop'

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

      it "only stops the sender if called without any options" do
        expect(Flydata::Command::Sender).to receive(:new).and_return(sender)
        expect(sender).to receive(:stop)
        subject.run
      end

      it "stops both the sender and helper when called with --full option" do
        expect(Flydata::Command::Sender).to receive(:new).and_return(sender)
        expect(sender).to receive(:stop)
        expect(opts).to receive(:full?).and_return(true)
        expect(Flydata::Command::Helper).to receive(:new).and_return(helper)
        expect(helper).to receive(:stop)
        described_class.new(opts).run
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
flydata-0.8.10.2 spec/flydata/command/stop_spec.rb
flydata-0.8.10.1 spec/flydata/command/stop_spec.rb
flydata-0.8.9.11 spec/flydata/command/stop_spec.rb
flydata-0.8.10 spec/flydata/command/stop_spec.rb
flydata-0.8.9 spec/flydata/command/stop_spec.rb
flydata-0.8.8 spec/flydata/command/stop_spec.rb
flydata-0.8.7 spec/flydata/command/stop_spec.rb
flydata-0.8.6 spec/flydata/command/stop_spec.rb
flydata-0.8.5 spec/flydata/command/stop_spec.rb
flydata-0.8.4 spec/flydata/command/stop_spec.rb
flydata-0.8.3 spec/flydata/command/stop_spec.rb
flydata-0.8.2 spec/flydata/command/stop_spec.rb
flydata-0.8.1 spec/flydata/command/stop_spec.rb
flydata-0.8.0 spec/flydata/command/stop_spec.rb
flydata-0.7.19 spec/flydata/command/stop_spec.rb
flydata-0.7.18 spec/flydata/command/stop_spec.rb
flydata-0.7.17 spec/flydata/command/stop_spec.rb
flydata-0.7.16 spec/flydata/command/stop_spec.rb
flydata-0.7.15 spec/flydata/command/stop_spec.rb
flydata-0.7.14 spec/flydata/command/stop_spec.rb