Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-27 Thread J. B. Rainsberger
On Mon, Jul 23, 2012 at 10:54 PM, David Chelimsky wrote: > I'd say, let's encourage people to use 'pending' correctly. WDYT? +1. -- J. B. (Joe) Rainsberger :: http://www.jbrains.ca :: http://blog.thecodewhisperer.com Author, JUnit Recipes Free Your Mind to Do Great Work :: http://www.freeyourmi

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-26 Thread David Chelimsky
On Thu, Jul 26, 2012 at 4:08 PM, James Cox wrote: > Chris, > > On Tue, Jul 24, 2012 at 4:54 PM, Chris Flipse wrote: >> >> >> >> On Tue, Jul 24, 2012 at 1:55 PM, James Cox wrote: >>> >>> so yes, pending is ok, but a second keyword "broken" might be nicer, >>> which would act the same but output d

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-26 Thread David Chelimsky
On Thu, Jul 26, 2012 at 4:06 PM, James Cox wrote: >> > so yes, pending is ok, but a second keyword "broken" might be nicer, >> > which would act the same but output different info. >> >> You can actually do that! >> >> RSpec.configuration do |c| >> c.alias_example_to :broken, :pending => "Broken

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-26 Thread James Cox
Chris, On Tue, Jul 24, 2012 at 4:54 PM, Chris Flipse wrote: > > > On Tue, Jul 24, 2012 at 1:55 PM, James Cox wrote: > >> so yes, pending is ok, but a second keyword "broken" might be nicer, >> which would act the same but output different info.-- >> > > There is a block form of pending. It ac

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-26 Thread James Cox
> > > so yes, pending is ok, but a second keyword "broken" might be nicer, > > which would act the same but output different info. > > You can actually do that! > > RSpec.configuration do |c| > c.alias_example_to :broken, :pending => "Broken" > end > > See > http://rubydoc.info/gems/rspec-core/RS

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-25 Thread David Chelimsky
On Tue, Jul 24, 2012 at 1:55 PM, James Cox wrote: > Yeah, I love pending too. but it doesn't help me get a sense of the > state of a suite before I start. now it's part of my practice to go in > and find out how much is commented out. > > David, > > three concerns with pending as an option: > > a.

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-24 Thread Sidu Ponnappa
I'd suggest adding a coverage ratchet to your build. It's the most effective (if occasionally annoying) tool when dealing with such situations. Some assumptions: * You need a CI server and everyone's using CCMenu/Buildnotify so the team knows as soon as the build breaks * You don't have a brittle

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-24 Thread Adam Sroka
AFAIK, there is no framework or tool that can prevent people from doing stupid things. I actually only use pending for one thing: in the morning it reminds me where I was heading the prior evening. On Jul 24, 2012 1:57 PM, "James Cox" wrote: > Yeah, I love pending too. but it doesn't help me ge

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-24 Thread Chris Flipse
On Tue, Jul 24, 2012 at 1:55 PM, James Cox wrote: > so yes, pending is ok, but a second keyword "broken" might be nicer, > which would act the same but output different info.-- > There is a block form of pending. It actually executes the contents of the block, but outputs as a pending test -- u

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-24 Thread James Cox
Yeah, I love pending too. but it doesn't help me get a sense of the state of a suite before I start. now it's part of my practice to go in and find out how much is commented out. David, three concerns with pending as an option: a. it won't help the people who think it's ok to comment out whole t

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-23 Thread Adam Sroka
I haven't posted in a while, but I want to say that as someone who spends a significant portion of his time teaching (T/B)DD I am totally in love with pending specs. There are analogous concepts in nearly every xUnit/xSpec, but pending is by far the best. Kudos. On Jul 23, 2012 9:57 PM, "David Che

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-23 Thread David Chelimsky
On Mon, Jul 23, 2012 at 11:19 AM, James Cox wrote: > Hey, > > in a bunch of the rescues i've recently done, I see a pretty big anti > pattern: tests don't work, and so rather than making them work, the > dev team just comments them out till 'later'. > > Does anyone think it'd be useful/interesting

Re: [rspec-users] A recently observed anti pattern: commented out tests

2012-07-23 Thread Todd Sedano
I must admit that I'm guilting of commenting out tests. I often do this when I know that the code works, and I just upgraded some gem, and now one of my tests no longer passes. I look at the test and realize that the effort it would take to get the test to work outweighs the value that the test pro

[rspec-users] A recently observed anti pattern: commented out tests

2012-07-23 Thread James Cox
Hey, in a bunch of the rescues i've recently done, I see a pretty big anti pattern: tests don't work, and so rather than making them work, the dev team just comments them out till 'later'. Does anyone think it'd be useful/interesting to get a flag for rspec which would compare lines vs lines-comm