destroy action implemented

This commit is contained in:
Thilko Richter
2012-09-06 07:38:54 +02:00
parent d084128297
commit 8a41dca46d
3 changed files with 52 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
require 'spec_helper'
# -*- encoding : utf-8 -*-
require 'spec_helper'
describe "homesick" do
let(:home) { create_construct }
@@ -158,4 +159,24 @@ describe "homesick" do
some_rc_file.readlink.should == tracked_file
end
end
describe "destroy" do
it "removes the symlink files" do
given_castle("stronghold")
some_rc_file = home.file '.some_rc_file'
homesick.track(some_rc_file.to_s, "stronghold")
homesick.destroy('stronghold')
some_rc_file.should_not be_exist
end
it "deletes the cloned repository" do
castle = given_castle("stronghold")
some_rc_file = home.file '.some_rc_file'
homesick.track(some_rc_file.to_s, "stronghold")
homesick.destroy('stronghold')
castle.should_not be_exist
end
end
end