specky/ruby/specky_formatter.rb
branchvim-stuff
changeset 23 050dd6dcf346
parent 22 ed72213b1788
child 24 38db5185d698
equal deleted inserted replaced
22:ed72213b1788 23:050dd6dcf346
   188 end # SpeckyFormatter
   188 end # SpeckyFormatter
   189 
   189 
   190 
   190 
   191 ### Identical to the regular SpeckyFormatter, but it puts summary
   191 ### Identical to the regular SpeckyFormatter, but it puts summary
   192 ### information at the bottom of the screen instead of the top, and just
   192 ### information at the bottom of the screen instead of the top, and just
   193 ### spits out rudamentary failure info.
   193 ### spits out rudamentary failure info.  Mimics the progress
       
   194 ### formatter for status feedback
   194 ###
   195 ###
   195 class SpeckyFormatterConsole < SpeckyFormatter
   196 class SpeckyFormatterConsole < SpeckyFormatter
       
   197 
       
   198 	def example_passed( ex );  print '.'; end
       
   199 	def example_failed( ex );  print 'F'; end
       
   200 	def example_pending( ex ); print '*'; end
       
   201 
   196 	def close
   202 	def close
       
   203 		puts
   197 		puts "Failures:" unless @failures.empty?
   204 		puts "Failures:" unless @failures.empty?
   198 		@failures.each do |test|
   205 		@failures.each do |test|
   199 			metadata = test.metadata
   206 			metadata = test.metadata
   200 			msg = "- %s\n  %s\n  %s:%d\n\n" % [
   207 			msg = "- %s\n  %s\n  %s:%d\n\n" % [
   201 				metadata[:full_description],
   208 				metadata[:full_description],