examples/unit/gpg_example.rb in astrails-safe-0.1.8 vs examples/unit/gpg_example.rb in astrails-safe-0.1.9
- old
+ new
@@ -10,12 +10,12 @@
}
end
def gpg(config = {}, backup = def_backup)
Astrails::Safe::Gpg.new(
- @config = Astrails::Safe::Config::Node.new(nil, config),
- @backup = Astrails::Safe::Backup.new(backup)
+ Astrails::Safe::Config::Node.new(nil, config),
+ Astrails::Safe::Backup.new(backup)
)
end
after(:each) { Astrails::Safe::TmpFile.cleanup }
@@ -31,41 +31,41 @@
before(:each) do
stub(@gpg).active? {true}
end
it "should add .gpg extension" do
- mock(@backup.extension) << '.gpg'
+ mock(@gpg.backup.extension) << '.gpg'
@gpg.process
end
it "should add command pipe" do
- mock(@backup.command) << (/\|gpg -BLAH/)
+ mock(@gpg.backup.command) << (/\|gpg -BLAH/)
@gpg.process
end
it "should set compressed" do
- mock(@backup).compressed = true
+ mock(@gpg.backup).compressed = true
@gpg.process
end
end
describe "when inactive" do
before(:each) do
stub(@gpg).active? {false}
end
it "should not touch extension" do
- dont_allow(@backup.extension) << anything
+ dont_allow(@gpg.backup.extension) << anything
@gpg.process
end
it "should not touch command" do
- dont_allow(@backup.command) << anything
+ dont_allow(@gpg.backup.command) << anything
@gpg.process
end
it "should not touch compressed" do
- dont_allow(@backup).compressed = anything
+ dont_allow(@gpg.backup).compressed = anything
@gpg.process
end
end
end
\ No newline at end of file