|
|
|
|
|
by stormbrew
4840 days ago
|
|
I think that isolation testing files is considerably harder than isolation testing classes. You can't force isolation of one by using isolation of the other. For requires going stale, I mean when a file originally depends on something but no longer does. The require is likely to linger, especially if the dependency is removed without knowing that it was the entirety or the last of the dependency. This file now has stale dependencies. Then something requiring that file will have that dependency in place and possibly use it without requiring it because of that. This file now has incorrect dependencies. Expand the above across a more complex project and it becomes virtually impossible to verify the correctness of your requires, so you probably just stop trying and require things as needed, which makes it worse. When you finally discover it your changes (in your version control) become less isolated as random requires start popping in and out. This is not a new or unique problem to Ruby, obviously. C/C++ headers have a very similar problem. |
|