mirror of https://github.com/rails/rails
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:
parent
8543974afa
commit
6e2ca1a186
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue