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