[Rspec-devel] New proc.should_increment method

aslak hellesoy aslak.hellesoy at gmail.com
Fri Jul 14 17:25:16 EDT 2006


On 7/14/06, David Astels <dastels at daveastels.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> On 14-Jul-06, at 4:14 PM, aslak hellesoy wrote:
> >
> > One thing I'd like to instead of:
> >
> >   thing = mock("thing")
> >
> > is to do:
> >
> >   thing = mock(Thing) # passing a class rather than a string
> >
> > -and have the mock fail if you tell it to expect a message that is not
> > defined by Thing.
>
> So.. only being able to mock classes that exist.  I don't like that
> at all.  That doesn't let you use mocks to explore & discover the
> interface.
>

I didn't mean it should be the only way. In my specs I'd like to start
out with strings, and once I think it looks good (i.e. I have
discovered the interface), I'd like to change it to use a class, which
would then lead me to implement that new interface.

Aslak

> Maybe as a flavour of mock... but not as the only way to do it.
>
> Dave
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (Darwin)
>
> iD8DBQFEuALsauez/L4x7g4RAvJdAKCTenKZFBfnyLaMwg7DJ/1YifMO5QCgwBVD
> SKjNzUK0SFtpzxKEXOocXDo=
> =PAsE
> -----END PGP SIGNATURE-----
> _______________________________________________
> Rspec-devel mailing list
> Rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel
>


More information about the Rspec-devel mailing list