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

David Chelimsky dchelimsky at gmail.com
Thu Jul 26 20:09:41 UTC 2012


On Thu, Jul 26, 2012 at 4:06 PM, James Cox <james at imaj.es> 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"
>> end
>>
>> See
>> http://rubydoc.info/gems/rspec-core/RSpec/Core/ExampleGroup.alias_example_to
>> and
>> https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/example_group.rb#L69-104
>>
>
> David, i'm going to give that a go - see how it shakes out in real-world
> use. It might work to visually make it distinguishable enough to process. :)
> thanks.

Cool. Please report back if you learn anything interesting.

Cheers,
David


More information about the rspec-users mailing list