[rspec-users] How to spec within a block?
rem.gagnon at gmail.com
Wed Feb 11 20:42:18 EST 2009
It works thanks for the hints
On Wed, Feb 11, 2009 at 8:21 PM, Pat Maddox <pergesu at gmail.com> wrote:
> On Sat, Feb 7, 2009 at 3:47 AM, rgagnon <rem.gagnon at gmail.com> wrote:
> > I have this and I want to mock the to_xml but not his block cause this
> > is what I want to spec. Is there a way to do this?
> Use and_yield to yield an object, and you can set expectations on it.
> For example:
> xml_detent = mock('xml detenteur')
> Does that make sense?
> rspec-users mailing list
> rspec-users at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users