The spec command has an option to run a single spec. I''m realizing that I never, ever use this. Does anyone else? If not, I''d like to get rid of it! It''s one of those things that "seemed like a good idea at the time", but resulted in a bunch of hack-ish code.
On 8/28/06, David Chelimsky <dchelimsky at gmail.com> wrote:> The spec command has an option to run a single spec. I''m realizing > that I never, ever use this. Does anyone else? If not, I''d like to get > rid of it! It''s one of those things that "seemed like a good idea at > the time", but resulted in a bunch of hack-ish code.I use this feature a lot. It''s especially useful when you have a bunch of slow specs. Even as one of the writers of Ashcroft (http://docs.codehaus.org/display/ASH/Home) slow specs are sometimes unavoidable. Now for example, I''m writing a library that interfaces with a local scm, which is inherently slow. Example of the way I use it is: 1) spec # run all specs - they pass. The suite takes 15 seconds (sloooow) 2) Do a refactoring 3) spec # 10 of the specs fail 4) spec -s ''One of the failing specs'' # Takes 1 second instead of 15. The nice thing about this is that the argument to -s can be copied and pasted from the error messages. So please don''t remove this feature. Aslak> _______________________________________________ > Rspec-users mailing list > Rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On Aug 28, 2006, at 1:49 AM, David Chelimsky wrote:> The spec command has an option to run a single spec. I''m realizing > that I never, ever use this. Does anyone else? If not, I''d like to get > rid of it! It''s one of those things that "seemed like a good idea at > the time", but resulted in a bunch of hack-ish code.I sometimes like being able to do this in xUnit frameworks when writing something new or digging in to something that isn''t working. I don''t yet have this use case while using rspec, though, since I''m not actively using it on anything yet. At this point, then, I don''t care either way, but I wanted to throw this idea out there. Regards, Craig