at error, forget old "success" in .cmdtest-filter

with this changes a test will be re-run again even if
it is restored to an earlier content.
(all this is about the effect of the -i option)
This commit is contained in:
Johan Holmberg 2016-09-17 19:19:47 +02:00
parent d477ccc24a
commit 8124d2fcd6
2 changed files with 6 additions and 0 deletions

View File

@ -179,6 +179,7 @@ module Cmdtest
runner.method_filter.success(method_id)
rescue Cmdtest::AssertFailed => e
clog.assert_failure(e.message)
runner.method_filter.failure(method_id)
rescue => e
io = StringIO.new
io.puts "CAUGHT EXCEPTION:"
@ -186,6 +187,7 @@ module Cmdtest
io.puts "BACKTRACE:"
io.puts e.backtrace.map {|line| " " + line }
clog.assert_error(io.string)
runner.method_filter.failure(method_id)
end
end
ensure

View File

@ -63,6 +63,10 @@ module Cmdtest
@new_filter[method_id.key] = _get_method_signature(method_id)
end
def failure(method_id)
@new_filter.delete(method_id.key)
end
def _maybe_read_ruby_file(file)
return if @files_read[file]
@files_read[file] = true