You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following test code may randomly raised NoMethodError in setup block:
setupdo@a=[1,2,3]endsub_test_case't'dosetupdo@b=@a[1]# this line randomly raised "NoMethodError: undefined method `[]' for nil:NilClass"endtest't'doasserttrueendend
I think:
setup block is GC'ed after define_mehod
the setup block's object id is reused for the another setup block
reused object id is added multiple times in fixture.after_callbacks(:setup) list
The following test code may randomly raised NoMethodError in
setup
block:I think:
setup
block is GC'ed afterdefine_mehod
setup
block's object id is reused for the anothersetup
blockfixture.after_callbacks(:setup)
listsetup
block call is occuredtest code:
result:
The text was updated successfully, but these errors were encountered: