fix output file writing

This commit is contained in:
John Bintz 2011-10-17 11:10:00 -04:00
parent 065cb6a985
commit f7e220bb18

View File

@ -67,18 +67,16 @@ module Jasmine
:only => @options[:files]
)
targets = template_writer.write!(files_list)
run_targets = targets.dup
@_targets = template_writer.write!(files_list)
run_targets = @_targets.dup
run_targets.pop if (!@options[:full_run] && files_list.filtered?) || files_list.has_spec_outside_scope?
system jasmine_command(run_targets)
status = $?.exitstatus
if !(runner_filename || (@options[:remove_html_file] && status != 0))
targets.each { |target| FileUtils.rm_f target }
@_status = $?.exitstatus
ensure
if @_targets && !runner_filename && (@options[:remove_html_file] || (@_status == 0))
@_targets.each { |target| FileUtils.rm_f target }
end
status
end
def runner_filename