[rspec-users] Shared behavior and_raise problem, and site aestetics

Chris Hoffman chris.c.hoffman at gmail.com
Fri May 11 11:43:09 EDT 2007


Well, I can't reproduce the problem outside of my code base, so I'm
guessing something is just funky with how I am setting up mocks, or
some such.  I will keep an eye on it.  For now I am plowing blindly
ahead, as I have soaked up enough time trying to decipher the problem.

-Chris

On 5/11/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> On 5/11/07, Chris Hoffman <chris.c.hoffman at gmail.com> wrote:
> > Okay, so maybe it is just my nascence with respect to Ruby.  Why do
> > you call Kernel::raise as opposed to just raise in
> > vendor/plugins/rspec/lib/spec/mocks/message_expectation.rb
>
> That's actually left over from when the matcher was "should raise"
> instead of "should raise_error". The reason at that time because we
> were defining a different raise method. At this point, it could
> probably just call raise, though that invokes Kernel#raise, so there's
> no harm in having it explicit.
>
> >
> > Thanks for helping me along with this problem.
> >
> > -Chris
> >
> > On 5/11/07, Chris Hoffman <chris.c.hoffman at gmail.com> wrote:
> > > I was thinking that just a gray would suffice, such as #BBBBBB .   As
> > > far as the raise problem, I will submit a proper bug with executable
> > > code.
> > >
> > > -Chris
> > >
> > > On 5/10/07, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> > > > On 5/10/07, Chris Hoffman <chris.c.hoffman at gmail.com> wrote:
> > > > > Hello,
> > > > >   Is anyone else having trouble with the and_raise method on mocks,
> > > > > with respect to shared behaviors?  If I do the following instead:
> > > > >
> > > > > foo.should_receive(:bar).and_return { raise }
> > > > >
> > > > > everything seems to work.  I have been supplying no arguments to
> > > > > and_raise, by the way.
> > > > >
> > > >
> > > > please supply an example that illustrates your case. one that we can execute.
> > > >
> > > > > Also, you may want to make the background in the code examples on the
> > > > > home page a little lighter.  I am hardly able to read the
> > > > > darker-colored bits.
> > > > >
> > > >
> > > > what colour (hexcode) would be better?
> > > >
> > > > aslak
> > > >
> > > > > Thanks.
> > > > >
> > > > > -Chris
> > > > > _______________________________________________
> > > > > 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
> >
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list