Replace a system call in the spec helper

This commit is contained in:
Nicolas McCurdy
2014-01-16 06:15:37 -05:00
parent 5dc7b5068d
commit 84fb1d1462

View File

@@ -33,7 +33,7 @@ RSpec.configure do |config|
if subdirs
subdir_file = castle.join(Homesick::SUBDIR_FILENAME)
subdirs.each do |subdir|
system "echo #{subdir} >> #{subdir_file}"
File.open(subdir_file, 'a') { |file| file.write "\n#{subdir}\n" }
end
end
return castle.directory('home')