The core model class of this project is OutdatedGem. Currently, an instance of this class represents a complex object graph that is tightly coupled with Bundler classes like Bundler::LazySpecification. Because of this complexity and broad scope, writing test coverage for different scenarios involving OutdatedGem is prohibitively difficult without a significant amount of mocking or fixture setup.
This PR addresses this problem by refactoring OutdatedGem to be a shallow, struct-like data class that no longer has external Bundler dependencies.
With that refactor in place, I was able to install FactoryBot and use it to easily write some new unit tests for CLI::Row.
The core model class of this project is
OutdatedGem
. Currently, an instance of this class represents a complex object graph that is tightly coupled with Bundler classes likeBundler::LazySpecification
. Because of this complexity and broad scope, writing test coverage for different scenarios involvingOutdatedGem
is prohibitively difficult without a significant amount of mocking or fixture setup.This PR addresses this problem by refactoring
OutdatedGem
to be a shallow, struct-like data class that no longer has external Bundler dependencies.With that refactor in place, I was able to install FactoryBot and use it to easily write some new unit tests for
CLI::Row
.