follow Ruby Style Guide for some points

This commit is contained in:
muratayusuke
2013-06-19 17:21:24 +00:00
parent 00f49be42c
commit 21cbb2c697
5 changed files with 37 additions and 26 deletions

View File

@@ -16,13 +16,13 @@ RSpec.configure do |config|
homesick.stub(:say_status)
end
def given_castle(path, subdirs=[])
def given_castle(path, subdirs = [])
name = Pathname.new(path).basename
castles.directory(path) do |castle|
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"
if subdirs then
if subdirs
subdir_file = castle.join(Homesick::SUBDIR_FILENAME)
subdirs.each do |subdir|
system "echo #{subdir} >> #{subdir_file}"