[rspec-devel] Rails #8115 and spec/matchers/have
dchelimsky at gmail.com
Thu Nov 8 15:44:55 EST 2007
On Nov 8, 2007 11:29 AM, David Chelimsky <dchelimsky at gmail.com> wrote:
> On Nov 8, 2007 9:20 AM, Brandon Keepers <brandon at collectiveidea.com> wrote:
> > Rails commit #8115 refactored how plugins are loaded and now adds all
> > the vendor/plugins/*/lib directories to the load path before
> > initializing all the plugins.
> > rspec and rspec_on_rails both have spec/matchers/have.rb, and now that
> > they're both in the load path, when rspec initializes and requires
> > spec/matchers/have, the rspec_on_rails version gets loaded.
> > This seems to only happen when I run integration tests and not specs
> > (stack trace below). The ways I see to fix this are 1) require these
> > using an absolute path or 2) rename the rails one to spec/rails/
> > matchers/have, or something along those lines.
> > I'd be happy to submit a patch, let me know what you think about ways
> > to get around this.
> A patch would be awesome - thanks!
> How about moving it from rspec_on_rails/lib/spec/matchers/have to
> rspec_on_rails/lib/extensions/spec/matchers/have and include require
> 'spec/matchers/have' from within that file.
> That file monkey patches Spec::Matchers::Have and I think putting
> under an extensions directory makes sense.
Actually - I'll take care of this - should have it committed in a few.
More information about the rspec-devel