spec/flydata/command/setup_spec.rb in flydata-0.6.3 vs spec/flydata/command/setup_spec.rb in flydata-0.6.4

- old
+ new

@@ -17,24 +17,24 @@ let(:login) { double('login') } before do allow(subject).to receive(:retrieve_data_entries).and_return(data_entries) allow(subject).to receive(:flydata).and_return(flydata) - expect(flydata).to receive(:data_port).and_return(data_port) + allow(flydata).to receive(:data_port).and_return(data_port) allow(flydata).to receive(:flydata_api_host).and_return('localhost') expect(flydata).to receive(:credentials).and_return(credentials) expect(credentials).to receive(:authenticated?).and_return(false) - expect(data_port).to receive(:get).and_return(dp) + allow(data_port).to receive(:get).and_return(dp) expect(sender).to receive(:process_exist?).and_return(true) expect(sender).to receive(:stop) - expect(sync_fm).to receive(:binlog_path).and_return('/tmp') + allow(sync_fm).to receive(:source_pos_path).and_return('/tmp') expect(conf).to receive(:copy_templates) expect(login).to receive(:run) expect(sender).to receive(:restart) + allow(Flydata::SyncFileManager).to receive(:new).with(de).and_return(sync_fm) end it do expect(Flydata::Command::Conf).to receive(:new).and_return(conf) - expect(Flydata::SyncFileManager).to receive(:new).with(de).and_return(sync_fm) expect(Flydata::Command::Login).to receive(:new).and_return(login) expect(Flydata::Command::Sender).to receive(:new).and_return(sender).twice subject.initial_run end