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

James Cox james at imaj.es
Thu Jul 26 20:06:07 UTC 2012


>
> > 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.

-james
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120726/c7288f81/attachment.html>


More information about the rspec-users mailing list