tests/test_helper.rb in ruby-station-0.1.3 vs tests/test_helper.rb in ruby-station-0.1.4.rc1

- old
+ new

@@ -1,27 +1,23 @@ require 'fileutils' require 'ramaze' -Ramaze.options.started = true TESTS_DIR = __DIR__ def TESTS_DIR./(*paths) File.expand_path(File.join(*paths), TESTS_DIR) end def clear_tmp(tmp_dir) if File.exist?(tmp_dir) - puts "removing all files under #{tmp_dir}..." - puts "are you sure? [just push enter if so]" - if STDIN.gets.chomp.empty? - FileUtils.rm_r(tmp_dir) - else - raise "user chose not to clear the temporary directory" - end + puts "removing all files under #{tmp_dir}... [Ctrl-C to stop it]" + sleep 2 + FileUtils.rm_r(tmp_dir) else Dir.mkdir(tmp_dir) end end -clear_tmp(TESTS_DIR/"tmp/") -require TESTS_DIR/"../config.rb" -Conf.init TESTS_DIR/"data/conf_dir" +def hello_gem_path(version) + TESTS_DIR/"data/hello/pkg/hello-ruby-station-#{version}.gem" +end +clear_tmp(TESTS_DIR/"tmp/")