rspec/rspec-support — pull request #7 by JonRowe (2013-10-25 00:25:24+00:00)
Title: Defering to `rspec-core` when available without depending on it

Quoting @myronmarston :
>I'm worried that we're creating a circular dependency here: rspec-core depends on this gem, and this gem now implicitly depends on rspec-core, and that could create a maintenance headache. (Consider, for example, what happens when we decide to change the deprecation formatter API: we'll have to coordinate changes in rspec-core and rspec-support).

>Do you think there's a reasonable way to get this to work that doesn't involve creating that circular dependency?

>For example, maybe this gem could just define the core-less version of these methods, and then core can override those definitions. Or here it could define the methods only if defined?(::RSpec::Core) is false, and then rspec-core can take care of defining its versions.

>Thoughts?

My own immediate thoughts are that I'd rather have all this code in `-support` but I can see @myronmarston's concerns. Originally the definition of this didn't depend on a formatter, and even if we were to only define the two deprecation methods if Core wasn't loaded we're splitting the responsibility for this functionality into two places. Which I don't like, however it would still eliminate 2 places (`-mocks` and `-expectations`) which is still a benefit. So...

Thoughts?

/cc @samphippen @alindeman @soulcutter @xaviershay