lib/irt/commands/test.rb in irt-1.1.6 vs lib/irt/commands/test.rb in irt-1.1.7

- old
+ new

@@ -43,16 +43,11 @@ puts end alias_method :tt, :add_test def save_as(path) - path = File.expand_path(path) - if File.exists?(path) - return if IRT.prompter.no? %(Do you want to overwrite "#{path}"?), :hint => '[y|<enter=n]', :default => 'n' - end - cp IRT.irt_file, path - ENV['IRT_COMMAND'] = ENV['IRT_COMMAND'].sub(/#{Regexp.quote(IRT.irt_file)}/, path) - rerun + require 'irt/utils' + IRT::Utils.save_as(IRT.irt_file, path, IRT.prompter){ rerun } end alias_method :sa, :save_as end end