spec/unit/action/clean_spec.rb in librarian-0.0.20 vs spec/unit/action/clean_spec.rb in librarian-0.0.21
- old
+ new
@@ -20,11 +20,10 @@
describe "clearing the cache path" do
before do
action.stub(:clean_install_path)
- action.stub(:clean_lockfile_path)
end
context "when the cache path is missing" do
before do
env.stub_chain(:cache_path, :exist?) { false }
@@ -49,11 +48,10 @@
describe "clearing the install path" do
before do
action.stub(:clean_cache_path)
- action.stub(:clean_lockfile_path)
end
context "when the install path is missing" do
before do
env.stub_chain(:install_path, :exist?) { false }
@@ -89,38 +87,9 @@
child.should_receive(:rmtree).never
end
children.reject(&:file?).each do |child|
child.should_receive(:rmtree).exactly(:once)
end
- end
- end
-
- end
-
- describe "clearing the lockfile path" do
-
- before do
- action.stub(:clean_cache_path)
- action.stub(:clean_install_path)
- end
-
- context "when the lockfile path is missing" do
- before do
- env.stub_chain(:lockfile_path, :exist?) { false }
- end
-
- it "should not try to clear the lockfile path" do
- env.lockfile_path.should_receive(:rmtree).never
- end
- end
-
- context "when the lockfile path is present" do
- before do
- env.stub_chain(:lockfile_path, :exist?) { true }
- end
-
- it "should try to clear the lockfile path" do
- env.lockfile_path.should_receive(:rmtree).exactly(:once)
end
end
end