The Rails.logger double (via as_null_object) is leaking across tests. It is pulled from ::Rails and set as ::Graphiti.logger which, as a constant, persists across specs.
This resets Graphiti's config after the railtie specs which stub on it.
Also, the railtie test can't run without configuring rspec (via some helpers) and loading the Railtie under test. Ideally we'd use a slimmed-down spec_helper for configuring just rspec (without rails). However, that doesn't already exist, and we'd need some form of autoloading anyway; so for the time being we just use the existing rails_helper.
The
Rails.logger
double (viaas_null_object
) is leaking across tests. It is pulled from::Rails
and set as::Graphiti.logger
which, as a constant, persists across specs.This resets Graphiti's config after the railtie specs which stub on it.
Also, the railtie test can't run without configuring rspec (via some helpers) and loading the Railtie under test. Ideally we'd use a slimmed-down spec_helper for configuring just rspec (without rails). However, that doesn't already exist, and we'd need some form of autoloading anyway; so for the time being we just use the existing rails_helper.