Make tests safer

Using a class variable here makes the tests susceptible to phantom
greens because (depending on the order of the tests), the class variable
could have been set by a prior test. (Test polution)

Better to have the variable be tied to the instance.
This commit is contained in:
Jason Karns 2019-09-12 11:21:25 -04:00 committed by Kasper Timm Hansen
parent 8543974afa
commit 6e2ca1a186
No known key found for this signature in database
GPG Key ID: 191153215EDA53D8
1 changed files with 2 additions and 2 deletions

View File

@ -13,11 +13,11 @@ class ConcernTest < ActiveSupport::TestCase
end
def included_ran=(value)
@@included_ran = value
@included_ran = value
end
def included_ran
@@included_ran
@included_ran
end
end