fix output file writing
This commit is contained in:
parent
065cb6a985
commit
f7e220bb18
@ -67,18 +67,16 @@ module Jasmine
|
|||||||
:only => @options[:files]
|
:only => @options[:files]
|
||||||
)
|
)
|
||||||
|
|
||||||
targets = template_writer.write!(files_list)
|
@_targets = template_writer.write!(files_list)
|
||||||
run_targets = targets.dup
|
run_targets = @_targets.dup
|
||||||
run_targets.pop if (!@options[:full_run] && files_list.filtered?) || files_list.has_spec_outside_scope?
|
run_targets.pop if (!@options[:full_run] && files_list.filtered?) || files_list.has_spec_outside_scope?
|
||||||
|
|
||||||
system jasmine_command(run_targets)
|
system jasmine_command(run_targets)
|
||||||
status = $?.exitstatus
|
@_status = $?.exitstatus
|
||||||
|
ensure
|
||||||
if !(runner_filename || (@options[:remove_html_file] && status != 0))
|
if @_targets && !runner_filename && (@options[:remove_html_file] || (@_status == 0))
|
||||||
targets.each { |target| FileUtils.rm_f target }
|
@_targets.each { |target| FileUtils.rm_f target }
|
||||||
end
|
end
|
||||||
|
|
||||||
status
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def runner_filename
|
def runner_filename
|
||||||
|
Loading…
Reference in New Issue
Block a user