Sha256: 33295144cc171a396368c2886b77f9171fdc2172aafa92a26aabba6e42a1fd54

Contents?: true

Size: 984 Bytes

Versions: 42

Compression:

Stored size: 984 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(: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_any_instance_of(Flydata::Command::Restart).to receive(:system).with('flydata helper: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)
        expect_any_instance_of(Flydata::Command::Restart).to receive(:system).never
        described_class.new(opts).run
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

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