Permalink
Browse files

Recreate the install path when installing.

  • Loading branch information...
1 parent c6feb8f commit 36cc6c2b291371476b09137acf7018798f83ede3 @yfeldblum yfeldblum committed Apr 14, 2012
Showing with 5 additions and 3 deletions.
  1. +2 −1 lib/librarian/action/install.rb
  2. +3 −2 spec/unit/action/install_spec.rb
@@ -47,7 +47,8 @@ def cache_manifests(manifests)
end
def create_install_path
- install_path.mkpath unless install_path.exist?
+ install_path.rmtree if install_path.exist?
+ install_path.mkpath
end
def install_manifests(manifests)
@@ -94,13 +94,14 @@ module Librarian
end
end
- it "should not try to create the install path if it already exists" do
+ it "should recreate the install path if it already exists" do
action.stub(:sorted_manifests) { sorted_manifests }
action.stub(:cache_manifests)
action.stub(:install_manifests)
install_path.stub(:exist?) { true }
- install_path.should_not_receive(:mkpath)
+ install_path.should_receive(:rmtree)
+ install_path.should_receive(:mkpath)
end
end

0 comments on commit 36cc6c2

Please sign in to comment.