How do you hide all the green passing examples from the output? I don''t need to know what has passed and it means I have to scroll to see what has failed. -- Posted via http://www.ruby-forum.com/.
I assume you are running with ''-f s'' switch? Maybe its in your spec.opts file ... maybe as --format progress? If you change that to ''-f p'' you only see progress as a single ''.'' for each passing test with errors at the end of the output. Or maybe I''m not understanding the question. On Wed, May 7, 2008 at 4:18 PM, Oliver Saunders <lists at ruby-forum.com> wrote:> How do you hide all the green passing examples from the output? > I don''t need to know what has passed and it means I have to scroll to > see what has failed. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080507/44b9a220/attachment.html>
On Wed, May 7, 2008 at 4:18 PM, Oliver Saunders <lists at ruby-forum.com> wrote:> How do you hide all the green passing examples from the output? > I don''t need to know what has passed and it means I have to scroll to > see what has failed.Hey Oliver, You can write a custom formatter that implements #example_passed as a noop: class HalfEmptyFormatter < Spec::Runner::Formatter::ProgressBarFormatter def example_passed; end end
Steve Downey wrote:> I assume you are running with ''-f s'' switch? Maybe its in your > spec.opts file ... maybe as --format progress? > > If you change that to ''-f p'' you only see progress as a single ''.'' for > each passing test with errors at the end of the output. > > Or maybe I''m not understanding the question. > > On Wed, May 7, 2008 at 4:18 PM, Oliver Saunders <lists at ruby-forum.com > <mailto:lists at ruby-forum.com>> wrote: > > How do you hide all the green passing examples from the output? > I don''t need to know what has passed and it means I have to scroll to > see what has failed. > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org <mailto:rspec-users at rubyforge.org> > http://rubyforge.org/mailman/listinfo/rspec-users > > > ------------------------------------------------------------------------ > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-usersI wrote some JS that would hide the passing specs on the HTML formatted version and would allow you to expand it later. I might be able to dig it up if your interested... -Ben
I should explain I''m running the tests from textmate. So for those interested in doing the same I changed the "Run Examples" command in the RSpec bundle to: #!/usr/bin/env ruby require ENV[''TM_BUNDLE_SUPPORT''] + "/lib/spec/mate" require ''spec/runner/formatter/html_formatter'' module Spec::Runner::Formatter class TextMateFormatter < HtmlFormatter # hide passes def example_passed(*args); end end end Spec::Mate::Runner.new.run_file STDOUT -- Posted via http://www.ruby-forum.com/.