move castle/home/.homesick_subdir to castle/.homesick_subdir
This commit is contained in:
@@ -248,7 +248,7 @@ describe "homesick" do
|
||||
some_nested_file = home.file('some/nested/file.txt')
|
||||
homesick.track(some_nested_file.to_s, 'castle_repo')
|
||||
|
||||
subdir_file = castle.join(Homesick::SUBDIR_FILENAME)
|
||||
subdir_file = castle.parent.join(Homesick::SUBDIR_FILENAME)
|
||||
File.open(subdir_file, 'r') do |f|
|
||||
f.readline.should == "some/nested\n"
|
||||
end
|
||||
@@ -262,7 +262,7 @@ describe "homesick" do
|
||||
homesick.track(some_nested_file.to_s, 'castle_repo')
|
||||
homesick.track(other_nested_file.to_s, 'castle_repo')
|
||||
|
||||
subdir_file = castle.join(Homesick::SUBDIR_FILENAME)
|
||||
subdir_file = castle.parent.join(Homesick::SUBDIR_FILENAME)
|
||||
File.open(subdir_file, 'r') do |f|
|
||||
f.readlines.size.should == 1
|
||||
end
|
||||
@@ -276,7 +276,7 @@ describe "homesick" do
|
||||
homesick.track(some_nested_file.to_s, 'castle_repo')
|
||||
homesick.track(nested_parent.to_s, 'castle_repo')
|
||||
|
||||
subdir_file = castle.join(Homesick::SUBDIR_FILENAME)
|
||||
subdir_file = castle.parent.join(Homesick::SUBDIR_FILENAME)
|
||||
File.open(subdir_file, 'r') do |f|
|
||||
f.each_line { |line| line.should_not == "some/nested\n" }
|
||||
end
|
||||
|
||||
@@ -22,14 +22,13 @@ RSpec.configure do |config|
|
||||
Dir.chdir(castle) do
|
||||
system "git init >/dev/null 2>&1"
|
||||
system "git remote add origin git://github.com/technicalpickles/#{name}.git >/dev/null 2>&1"
|
||||
castle_home = castle.directory("home")
|
||||
if subdirs then
|
||||
subdir_file = castle_home.join(Homesick::SUBDIR_FILENAME)
|
||||
subdir_file = castle.join(Homesick::SUBDIR_FILENAME)
|
||||
subdirs.each do |subdir|
|
||||
system "echo #{subdir} >> #{subdir_file}"
|
||||
end
|
||||
end
|
||||
return castle_home
|
||||
return castle.directory("home")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user