Skip to content

Commit

Permalink
More terse test
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Jul 23, 2011
1 parent 74c2a8c commit 16c21ed
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions test/vagrant/provisioners/chef_solo_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,12 @@ class ChefSoloProvisionerTest < Test::Unit::TestCase
assert_equal [[:host, local_path, remote_path]], @action.expanded_folders([:host, path])
end

should "expand multiple host folders properly" do
cookbooks_path = "cookbooks"
cookbooks_local_path = File.expand_path(cookbooks_path, @env.root_path)
cookbooks_remote_path = "#{@action.config.provisioning_path}/chef-solo-4"
roles_path = "roles"
roles_local_path = File.expand_path(roles_path, @env.root_path)
roles_remote_path = "#{@action.config.provisioning_path}/chef-solo-5"

assert_not_equal @action.expanded_folders([:host, cookbooks_path])[0].last, @action.expanded_folders([:host, roles_path])[0].last
assert_equal [[:host, cookbooks_local_path, cookbooks_remote_path]], @action.expanded_folders([:host, cookbooks_path])
assert_equal [[:host, roles_local_path, roles_remote_path]], @action.expanded_folders([:host, roles_path])
should "share roles and cookbooks in different folders" do
local_roles_path = File.expand_path('roles',@env.root_path)
local_cookbooks_path = File.expand_path('cookbooks',@env.root_path)
remote_roles_path = @action.expanded_folders([:host,local_roles_path])[0][2]
remote_cookbooks_path = @action.expanded_folders([:host,local_cookbooks_path])[0][2]
assert_not_equal remote_roles_path, remote_cookbooks_path
end
end

Expand Down

0 comments on commit 16c21ed

Please sign in to comment.