[rspec-devel] dogfood time?

David Chelimsky dchelimsky at gmail.com
Sat Oct 14 15:53:22 EDT 2006


On 10/14/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> On 10/14/06, Brian Takita <brian.takita at gmail.com> wrote:
> > On 10/14/06, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:
> >
> > > On 10/11/06, David Chelimsky <dchelimsky at gmail.com> wrote:
> > > > On 10/11/06, Dave Astels <dastels at daveastels.com> wrote:
> > > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > > Hash: SHA1
> > > > >
> > > > >
> > > > > On 10-Oct-06, at 10:27 PM, aslak hellesoy wrote:
> > > > >
> > > > > > A while ago I brought up the idea of making RSpec self-hosting. I.e.
> > > > > > completely ditch RSpec's own Test::Unit tests and use RSpec to
> > verify
> > > > > > itself during the build process.
> > > > > >
> > > > > > One of the counter arguments that came up (I think it was Dave) was
> > > > > > "what if we have bugs that get masked".
> > > > > >
> > > > > > I think that at this point RSpec core is mature enough to make it
> > > > > > worth the risk. I think the risk of having masked bugs is minimal -
> > I
> > > > > > think we'd discover it quickly if it happened.
> > > > > >
> > > > > > What do you think? Is it time to trust our own tool and eat our own
> > > > > > dogfood?
> > > > > > (We'd check in the test2spec generated translations, reformat them
> > and
> > > > > > delete the Test::Unit tests plus test2spec)
> > > > >
> > > > > I think you're right that it's ready for that now.
> > > > >
> > > > > +1
> > > >
> > > > +1
> > > >
> > > > One word of caution on this. There are test/unit tests that don't get
> > > > translated in the build because they test things like the ability of
> > > > partial mocks to attach themselves to the Specification that is
> > > > current running. When running a Specification INSIDE a Specification,
> > > > the mocks attach themselves to the wrong spec. So this area will need
> > > > to be restructured such that we can translate all of the specs before
> > > > we follow through on this.
> > > >
> > >
> > > I have created branches/dogfood for this. Work done so far:
> > >
> > > * Checked in translated specs under the specs folder
> > > * Translated by hand specs that didn't translate (mock_spec.rb,
> > > context_spec.rb and a couple of others)
> > > * Deleted test2spec and all references in the doco and the Rakefile
> > > * Code coverage is now up from 95.8% to 98.3%
> >
> > Awesome.
> >
> > > Remaining work:
> > > * Delete the Test::Unit tests
> > > * Replace curlies with do/end (A regexp search/replace should do fine)
> > > * Indent/reformat the specs so they look nice.
> >
> > Was it difficult to do? Are there any rough areas?
> >
> > > Does anyone know of a tool that can format badly formatted ruby code
> > nicely?
> >
> >
> > Eclipse RDT? Textmate?
> >
> > > I'd like to get this back to trunk as soon as possible to avoid
> > > divergence. Any objections if I merge back before we've sorted the
> > > curlies/formatting issues?
> >
> > That sounds like a good idea.
>
> +1

One additional thought - when you merge, can you diff the trunk
against the revision (on the trunk) when you created the branch? If
there are any new test methods there (which there might be) they'll
get lost in the shuffle if you just merge in the changes (which
include deleting all of the test/unit tests).

Thanks,
David


More information about the rspec-devel mailing list