Sha256: e726a0fe96aba78bf1f95a8488c0a954981a4aeb6f93720e55d94e7aa3b68741
Contents?: true
Size: 1003 Bytes
Versions: 51
Compression:
Stored size: 1003 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(subject).to receive(:system) # Use Kernal#system to launch the helper 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
51 entries across 51 versions & 1 rubygems