Sha256: 9fb8f5bb0ddd3e0ac547decd594d3dd87ec47ab1d7344d1b20dc163cce838c83

Contents?: true

Size: 952 Bytes

Versions: 31

Compression:

Stored size: 952 Bytes

Contents

require 'spec_helper'
require 'flydata/command/restart'

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

      it "should restart sender and helper when skip-helper option is not passed" do
        expect(Flydata::Command::Sender).to receive(:new).and_return(sender)
        expect(sender).to receive(:restart)
        expect(Flydata::Command::Helper).to receive(:new).and_return(helper)
        expect(helper).to receive(:restart)
        subject.run
      end

      it "should only restart sender when skip-helper option is passed" do
        expect(Flydata::Command::Sender).to receive(:new).and_return(sender)
        expect(sender).to receive(:restart)
        expect(opts).to receive(:skip_helper?).and_return(true)
        described_class.new(opts).run
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
flydata-0.5.6 spec/flydata/command/restart_spec.rb
flydata-0.5.5 spec/flydata/command/restart_spec.rb
flydata-0.5.4 spec/flydata/command/restart_spec.rb
flydata-0.5.3 spec/flydata/command/restart_spec.rb
flydata-0.5.2 spec/flydata/command/restart_spec.rb
flydata-0.5.1 spec/flydata/command/restart_spec.rb
flydata-0.5.0 spec/flydata/command/restart_spec.rb
flydata-0.4.3 spec/flydata/command/restart_spec.rb
flydata-0.4.2 spec/flydata/command/restart_spec.rb
flydata-0.4.1 spec/flydata/command/restart_spec.rb
flydata-0.4.0 spec/flydata/command/restart_spec.rb