deal with edge case: the parent and descendant are both listed in the manifest

This commit is contained in:
muratayusuke
2013-06-04 17:36:47 +00:00
parent a95c4b2446
commit 8e58a3f5e2
2 changed files with 26 additions and 9 deletions

View File

@@ -148,6 +148,25 @@ describe "homesick" do
home_dotdir.join(".some_dotfile").readlink.should == dotfile
end
end
context "with '.config' and '.config/appA' in .homesick_subdir" do
let(:castle) { given_castle("glencairn", [".config", ".config/appA"]) }
it "can symlink under both of .config and .config/appA" do
config_dir = castle.directory(".config")
config_dotfile = config_dir.file(".some_dotfile")
appA_dir = config_dir.directory("appA")
appA_dotfile = appA_dir.file(".some_appfile")
homesick.symlink("glencairn")
home_config_dir = home.join(".config")
home_appA_dir = home_config_dir.join("appA")
home_config_dir.symlink?.should == false
home_config_dir.join(".some_dotfile").readlink.should == config_dotfile
home_appA_dir.symlink?.should == false
home_appA_dir.join(".some_appfile").readlink.should == appA_dotfile
end
end
end
describe "list" do