All shared folder tests passing. still failing tests in other areas to be worked on.

This commit is contained in:
Mitchell Hashimoto 2010-06-19 11:48:13 -07:00
parent 4c1ac8d2c1
commit 388662c62a
1 changed files with 25 additions and 25 deletions

View File

@ -21,6 +21,7 @@ class SharedFoldersActionTest < Test::Unit::TestCase
end end
@runner.stubs(:env).returns(env) @runner.stubs(:env).returns(env)
env.config.vm.shared_folders
end end
context "before boot" do context "before boot" do
@ -32,6 +33,15 @@ class SharedFoldersActionTest < Test::Unit::TestCase
end end
end end
context "after boot" do
should "mount folders then setup unison" do
seq = sequence("after")
@action.expects(:mount_shared_folders).once.in_sequence(seq)
@action.expects(:setup_unison).once.in_sequence(seq)
@action.after_boot
end
end
context "collecting shared folders" do context "collecting shared folders" do
setup do setup do
File.stubs(:expand_path).returns("baz") File.stubs(:expand_path).returns("baz")
@ -119,31 +129,21 @@ class SharedFoldersActionTest < Test::Unit::TestCase
end end
end end
# context "mounting the shared folders" do context "mounting the shared folders" do
# setup do setup do
# @folders = stub_shared_folders @folders = stub_shared_folders
# @ssh = mock("ssh") @ssh = mock("ssh")
# @runner.ssh.stubs(:execute).yields(@ssh) @runner.ssh.stubs(:execute).yields(@ssh)
# @runner.system.stubs(:mount_shared_folder) @runner.system.stubs(:mount_shared_folder)
# end end
# should "mount all shared folders to the VM" do should "mount all shared folders to the VM" do
# mount_seq = sequence("mount_seq") mount_seq = sequence("mount_seq")
# @folders.each do |name, hostpath, guestpath| @folders.each do |name, data|
# @runner.system.expects(:mount_shared_folder).with(@ssh, name, guestpath).in_sequence(mount_seq) @runner.system.expects(:mount_shared_folder).with(@ssh, name, data[:guestpath]).in_sequence(mount_seq)
# end end
# @action.after_boot @action.mount_shared_folders
# end end
end
# should "execute the necessary rysnc commands for each sync folder" do
# @folders.map { |f| f << 'sync' }
# @folders.each do |name, hostpath, guestpath, syncd|
# @runner.system.expects(:create_sync).with(@ssh, :syncpath => syncd, :guestpath => guestpath)
# end
# @runner.ssh.expects(:execute).yields(@ssh)
# @action.after_boot
# end
# end
end end