spec/generators/settings/gemfile_spec.rb in dslable-0.0.5 vs spec/generators/settings/gemfile_spec.rb in dslable-0.0.6
- old
+ new
@@ -45,11 +45,11 @@
end
end
def case_before(c)
# implement each case before
- Dir.mkdir(OUTPUT_GEMFILE_TMP_DIR) unless Dir.exists? OUTPUT_GEMFILE_TMP_DIR
+ Dir.mkdir(OUTPUT_GEMFILE_TMP_DIR) unless Dir.exist? OUTPUT_GEMFILE_TMP_DIR
Dir.chdir(OUTPUT_GEMFILE_TMP_DIR)
end
def setup_dsl(c, dsl)
dsl.gem_name c[:gem_name]
@@ -68,10 +68,10 @@
end
def case_after(c)
# implement each case after
Dir.chdir('../')
- FileUtils.rm_rf(OUTPUT_GEMFILE_TMP_DIR) if Dir.exists? OUTPUT_GEMFILE_TMP_DIR
+ FileUtils.rm_rf(OUTPUT_GEMFILE_TMP_DIR) if Dir.exist? OUTPUT_GEMFILE_TMP_DIR
end
end
end
end