Class: Minitest::TapJ

Inherits:
Minitap
  • Object
show all
Defined in:
lib/minitap/minitest5.rb

Overview

TAP-J adapater.

Constant Summary

Constants inherited from Minitap

Minitap::IGNORE_CALLERS, Minitap::REVISION

Instance Attribute Summary

Attributes inherited from Minitap

#case_start_time, #suite_start_time, #test_cases, #test_count, #test_start_time

Instance Method Summary collapse

Methods inherited from Minitap

#after_case, #after_suite, #after_test, #before_case, #before_suite, #before_test, #capture_io, #clean_message, #code_snippet, #count_tests!, #filter_backtrace, #filtered_tests, #location, #p, #parse_source_location, #print, #puts, #record, #record_stdcom, #report, #source, #start, #tapout_after_case, #tapout_after_test, #tapout_before_test, #test_err, #test_fail, #test_pass, #test_skip, #uncapture_io

Constructor Details

#initialize(options = {}) ⇒ TapJ

Returns a new instance of TapJ.



853
854
855
856
# File 'lib/minitap/minitest5.rb', line 853

def initialize(options={})
  require 'json' unless respond_to?(:to_json)
  super(options)
end

Instance Method Details

#tapout_after_suiteObject



876
877
878
# File 'lib/minitap/minitest5.rb', line 876

def tapout_after_suite()
  wp super().to_json
end

#tapout_before_case(test_case) ⇒ Object



861
862
863
# File 'lib/minitap/minitest5.rb', line 861

def tapout_before_case(test_case)
  wp super(test_case).to_json
end

#tapout_before_suiteObject



858
859
860
# File 'lib/minitap/minitest5.rb', line 858

def tapout_before_suite()
  wp super().to_json
end

#tapout_test_error(result) ⇒ Object



873
874
875
# File 'lib/minitap/minitest5.rb', line 873

def tapout_test_error(result)
  wp super(result).to_json
end

#tapout_test_failure(result) ⇒ Object



870
871
872
# File 'lib/minitap/minitest5.rb', line 870

def tapout_test_failure(result)
  wp super(result).to_json
end

#tapout_test_pass(result) ⇒ Object



864
865
866
# File 'lib/minitap/minitest5.rb', line 864

def tapout_test_pass(result)
  wp super(result).to_json
end

#tapout_test_skip(result) ⇒ Object



867
868
869
# File 'lib/minitap/minitest5.rb', line 867

def tapout_test_skip(result)
  wp super(result).to_json
end

#wp(str) ⇒ Object



880
881
882
# File 'lib/minitap/minitest5.rb', line 880

def wp(str)
  io.puts(str)
end