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:
parent
d477ccc24a
commit
8124d2fcd6
@ -179,6 +179,7 @@ module Cmdtest
|
|||||||
runner.method_filter.success(method_id)
|
runner.method_filter.success(method_id)
|
||||||
rescue Cmdtest::AssertFailed => e
|
rescue Cmdtest::AssertFailed => e
|
||||||
clog.assert_failure(e.message)
|
clog.assert_failure(e.message)
|
||||||
|
runner.method_filter.failure(method_id)
|
||||||
rescue => e
|
rescue => e
|
||||||
io = StringIO.new
|
io = StringIO.new
|
||||||
io.puts "CAUGHT EXCEPTION:"
|
io.puts "CAUGHT EXCEPTION:"
|
||||||
@ -186,6 +187,7 @@ module Cmdtest
|
|||||||
io.puts "BACKTRACE:"
|
io.puts "BACKTRACE:"
|
||||||
io.puts e.backtrace.map {|line| " " + line }
|
io.puts e.backtrace.map {|line| " " + line }
|
||||||
clog.assert_error(io.string)
|
clog.assert_error(io.string)
|
||||||
|
runner.method_filter.failure(method_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
|
@ -63,6 +63,10 @@ module Cmdtest
|
|||||||
@new_filter[method_id.key] = _get_method_signature(method_id)
|
@new_filter[method_id.key] = _get_method_signature(method_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def failure(method_id)
|
||||||
|
@new_filter.delete(method_id.key)
|
||||||
|
end
|
||||||
|
|
||||||
def _maybe_read_ruby_file(file)
|
def _maybe_read_ruby_file(file)
|
||||||
return if @files_read[file]
|
return if @files_read[file]
|
||||||
@files_read[file] = true
|
@files_read[file] = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user