spec/flydata/command/sync_spec.rb in flydata-0.4.3 vs spec/flydata/command/sync_spec.rb in flydata-0.5.0
- old
+ new
@@ -106,10 +106,11 @@
Flydata::Parser::Mysql::DatabaseSizeCheck.any_instance.should_receive(:get_db_bytesize).and_return(db_byte)
Flydata::MysqlCompatibilityCheck.any_instance.should_receive(:check)
end
context 'with no stream option' do
before do
+ expect(default_sync_fm).to receive(:save_sync_info).once
expect(subject).to receive(:free_disk_space).and_return(disk_byte)
expect(File).to receive(:dirname)
end
it 'will export to dump file' do
expect(subject).to receive(:call_block_or_return_io)
@@ -126,9 +127,10 @@
}.to raise_error
end
end
context 'with stream option' do
it 'will export to io' do
+ expect(default_sync_fm).to receive(:save_sync_info).once
Flydata::Parser::Mysql::MysqlDumpGeneratorNoMasterData.any_instance.should_receive(:dump)
subject.send(:generate_mysqldump, default_data_entry, default_sync_fm, false)
end
end