[rspec-devel] Rails #8115 and spec/matchers/have

David Chelimsky dchelimsky at gmail.com
Sat Nov 10 15:32:20 EST 2007


On Nov 9, 2007 11:06 PM, Zach Dennis <zach.dennis at gmail.com> wrote:
> I had issues loading the story runner as well. Attached is the one line
> require that fixed it...

Hey Zach,

Thanks for the patches, but I wanted to handle things a bit
differently. I'm not a big fan of absolute paths. So I moved things
around in rspec_on_rails so there shouldn't be any collisions. This
*should* be fixed as of 2844.

Thanks,
David

>
> Zach
>
>
>
> On 11/9/07, Zach Dennis <zach.dennis at gmail.com> wrote:
> >
> > Rspec now breaks with Rails because of require path issues. Attached is a
> patch to fix those.
> >
> >
> > It's because rspec_on_rails comes first in the $LOAD_PATH and both rspec
> and rspec_on_rails now have a " extensions.rb" file so "require
> 'spec/extensions'" is loading the wrong one first.
> >
> >
> >
> > --
> > Zach Dennis
> > http://www.continuousthinking.com
> >
> >
> >
> > On 11/8/07, David Chelimsky < dchelimsky at gmail.com> wrote:
> > > 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.
> > > >
> > > > WDYT?
> > >
> > > Actually - I'll take care of this - should have it committed in a few.
> > > _______________________________________________
> > > rspec-devel mailing list
> > > rspec-devel at rubyforge.org
> > > http://rubyforge.org/mailman /listinfo/rspec-devel
> > >
> >
> >
> >
> > --
> > Zach Dennis
> > http://www.continuousthinking .com
> >
>
>
>
> --
>
> Zach Dennis
> http://www.continuousthinking.com
> _______________________________________________
> rspec-devel mailing list
> rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the rspec-devel mailing list