chefspec reload guards can now be removed
A few places in our libraries we have this pattern:
class Foo
end unless defined?(Foo)
It's a guard against against redefinition during chefspec runs defeating mocking. It's sometimes, but not always, accompanied with a link to https://github.com/chefspec/chefspec/issues/562#issuecomment-74120922
This should no longer be necessary as during the Chef 13 Upgrade !2279 (merged) a mocking of Kernel.load was added for all libraries via the chef_helper
, as the reload guards weren't present in all libraries. https://gitlab.com/gitlab-org/omnibus-gitlab/blob/a82d010e84e07ee24890e95218f099c9128074e2/spec/chef_helper.rb#L65-69