test/virtualbox/vm_test.rb in virtualbox-0.2.0 vs test/virtualbox/vm_test.rb in virtualbox-0.3.0
- old
+ new
@@ -69,11 +69,15 @@
uart1="off"
uart2="off"
audio="none"
clipboard="bidirectional"
vrdp="off"
-usb="off"
+usb="off"
+SharedFolderNameMachineMapping1="mysharedfolder"
+SharedFolderPathMachineMapping1="/virtualbox"
+SharedFolderNameMachineMapping2="otherfolder"
+SharedFolderPathMachineMapping2="/virtualbox/lib"
showvminfo
@name = "foo"
# Just to be sure nothing is executed
@@ -352,10 +356,11 @@
end
should "save the relationships as well" do
VirtualBox::Nic.expects(:save_relationship).once
VirtualBox::StorageController.expects(:save_relationship).once
+ VirtualBox::SharedFolder.expects(:save_relationship).once
assert @vm.save
end
end
context "finding a VM by name" do
@@ -388,9 +393,15 @@
should "properly load storage controller relationship" do
assert @vm.storage_controllers
assert @vm.storage_controllers.is_a?(Array)
assert_equal 2, @vm.storage_controllers.length
+ end
+
+ should "properly load shared folder relationship" do
+ assert @vm.shared_folders
+ assert @vm.shared_folders.is_a?(Array)
+ assert_equal 2, @vm.shared_folders.length
end
end
context "parsing the showvminfo output" do
should "lowercase and symbolize the keys" do
\ No newline at end of file