spec/generators/rspec/specs_spec.rb in dslable-0.0.5 vs spec/generators/rspec/specs_spec.rb in dslable-0.0.6

- old
+ new

@@ -30,27 +30,27 @@ # -- when -- specs.generate # -- then -- c[:specs].each do |spec| - actual = File.exists?("./#{spec}") + actual = File.exist?("./#{spec}") expect(actual).to be_true end ensure case_after c end end def case_before(c) - Dir.mkdir(OUTPUT_SPECS_TMP_DIR) unless Dir.exists? OUTPUT_SPECS_TMP_DIR - Dir.chdir(OUTPUT_SPECS_TMP_DIR) + Dir.mkdir(OUTPUT_SPECS_TMP_DIR) unless Dir.exist? OUTPUT_SPECS_TMP_DIR + Dir.chdir(OUTPUT_SPECS_TMP_DIR) end - def case_after(c) - Dir.chdir('../') - FileUtils.rm_rf(OUTPUT_SPECS_TMP_DIR) if Dir.exists? OUTPUT_SPECS_TMP_DIR - end + def case_after(c) + Dir.chdir('../') + FileUtils.rm_rf(OUTPUT_SPECS_TMP_DIR) if Dir.exist? OUTPUT_SPECS_TMP_DIR + end end end end