mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
1 changed files with 2 additions and 2 deletions
|
@ -13,11 +13,11 @@ class ConcernTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def included_ran=(value)
|
def included_ran=(value)
|
||||||
@@included_ran = value
|
@included_ran = value
|
||||||
end
|
end
|
||||||
|
|
||||||
def included_ran
|
def included_ran
|
||||||
@@included_ran
|
@included_ran
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue