[rspec-users] Latest update - broken be_matchers?

David Chelimsky dchelimsky at gmail.com
Mon Nov 26 14:16:43 EST 2007


On Nov 26, 2007 1:09 PM, Daniel Tenner <daniel.ruby at tenner.org> wrote:
> First time I have a look inside the RSpec codebase (let alone the
> Story Runner), and not much luck this time. But, counter-intuitively
> enough, I think it's probably nothing to do with RailsStory itself
> since that didn't change in the last update. Trying to add an include
> Spec::Matchers in there also didn't help.
>
> Couldn't quite figure it out though. Too much to absorb in a single
> sitting.
>
> I'd love to know what it was when someone figures it out though.

I can tell you that what's been changing is the relationship between
rspec and T/U. We're moving towards an interop model where rspec can
run "pure" or can co-exist w/ Test::Unit when it is loaded. This will
make it easier for us to also support miniunit when it ships w/ Ruby
1.9.

My guess is that IntegrationTest, which I believe derives from
Test::Unit::TestCase, was implicitly inheriting all of the matchers,
but is not any longer due to something that changed under the hood.
Since there were no stories or examples of rails stories, nothing
broke. We'll have to add some of those :)

Again - I'll look at this tonight and get it working.

Cheers,
David

>
> Daniel
>
>
> On 26 Nov 2007, at 18:27 26 Nov 2007, David Chelimsky wrote:
>
> > On Nov 26, 2007 11:57 AM, Josh Knowles <joshknowles at gmail.com> wrote:
> >> On 11/26/07, Daniel Tenner <daniel.ruby at tenner.org> wrote:
> >>> Just seven upped the latest rspec update, and suddenly all my
> >>> be_matchers don't work anymore (they worked just before I updated):
> >>
> >> <snip />
> >>
> >>> Anyone else getting that?
> >>
> >> All of my controller specs are passing, but my stories are failing
> >> with the same error.
> >>
> >> This works:
> >> response.success?.should == true
> >>
> >> This doesn't:
> >> response.should be_success
> >
> > Actually I'm surprised these were ever working as RailsStory doesn't
> > include Spec::Matchers - just Spec::Rails::Matchers. The matchers must
> > have been making their way in through the back door.
> >
> > I won't have time to look at this until tonight, but feel free to
> > submit a patch in the mean time if you can figure it out.
> >
> > Cheers,
> > David
> >
> >>
> >> --
> >> Josh Knowles
> >> phone: 509-979-1593
> >> email:  joshknowles at gmail.com
> >> web:    http://joshknowles.com
> >>
> >> _______________________________________________
> >> rspec-users mailing list
> >> rspec-users at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >>
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list