spec/configuration/database/mysql_spec.rb in backup-3.0.20 vs spec/configuration/database/mysql_spec.rb in backup-3.0.21
- old
+ new
@@ -12,12 +12,14 @@
db.port = 'myport'
db.socket = 'mysocket'
db.skip_tables = %w[my tables]
db.only_tables = %w[my other tables]
db.additional_options = %w[my options]
+ db.mysqldump_utility = '/path/to/mysqldump'
end
end
+ after { Backup::Configuration::Database::MySQL.clear_defaults! }
it 'should set the default MySQL configuration' do
db = Backup::Configuration::Database::MySQL
db.name.should == 'mydb'
db.username.should == 'myuser'
@@ -26,10 +28,11 @@
db.port.should == 'myport'
db.socket.should == 'mysocket'
db.skip_tables.should == %w[my tables]
db.only_tables.should == %w[my other tables]
db.additional_options.should == %w[my options]
+ db.mysqldump_utility.should == '/path/to/mysqldump'
end
describe '#clear_defaults!' do
it 'should clear all the defaults, resetting them to nil' do
Backup::Configuration::Database::MySQL.clear_defaults!
@@ -42,8 +45,9 @@
db.port.should == nil
db.socket.should == nil
db.skip_tables.should == nil
db.only_tables.should == nil
db.additional_options.should == nil
+ db.mysqldump_utility.should == nil
end
end
end