Skip to content

Commit 2cefbb7

Browse files
tikksskouono-max
authored
test: clear called state in setup (#328)
`@@called` is a class variable, so it shares between subclasses. For future multi-process based parallelization support. Part of GH-235. Co-authored-by: Sutou Kouhei <kou@clear-code.com> Co-authored-by: Naoto Ono <onoto1998@gmail.com>
1 parent 6e9228d commit 2cefbb7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/test-test-case.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,7 @@ def test2_parent
10631063
self.class.called << :test2_parent
10641064
end
10651065
end
1066+
@parent_test_case.called.clear
10661067

10671068
@child_test_case = Class.new(@parent_test_case) do
10681069
class << self
@@ -1091,6 +1092,7 @@ def test2_child
10911092
self.class.called << :test2_child
10921093
end
10931094
end
1095+
@child_test_case.called.clear
10941096
end
10951097

10961098
def teardown

0 commit comments

Comments
 (0)