More test cleanups

This commit is contained in:
Mitchell Hashimoto 2012-05-01 22:10:10 -07:00
parent 9b20173dfb
commit 13a27eb723
1 changed files with 8 additions and 9 deletions

View File

@ -15,16 +15,15 @@ describe Vagrant::SSH do
let(:ssh_instance) { Vagrant::SSH.new(double) }
before(:each) do
key_path.open("w") do |f|
f.write("hello!")
end
key_path.chmod(0644)
end
it "should not raise an exception if we set a keyfile permission correctly" do
ssh_instance.check_key_permissions(key_path)
# Write some stuff to our key file and chmod it to some
# incorrect permissions.
key_path.open("w") { |f| f.write("hello!") }
key_path.chmod(0644)
# This should work!
expect { ssh_instance.check_key_permissions(key_path) }.
to_not raise_error
end
end
end