Sha256: 9bdbe11fce19437f4f1b812ec68d0045d77676c78ac896a42c168d3eaa51af2e

Contents?: true

Size: 1.32 KB

Versions: 9

Compression:

Stored size: 1.32 KB

Contents

require 'plugin'
require 'defaults'

class StdoutPrettyTestsReport < Plugin
  
  def setup
    @result_list = []
    
    template = @ceedling[:file_wrapper].read( File.join( PLUGINS_STDOUT_PRETTY_TESTS_REPORT_PATH, 'template.erb' ) )
      
    @ceedling[:plugin_reportinator].register_test_results_template( template )
  end
  
  def post_test_execute(arg_hash)
    return if not (arg_hash[:context] == TEST_SYM)
  
    @result_list << arg_hash[:result_file]
  end
  
  def post_build
    return if not (@ceedling[:task_invoker].test_invoked?)

    results = @ceedling[:plugin_reportinator].assemble_test_results(@result_list)
    hash = {
      :header => '',
      :results => results
    }

    @ceedling[:plugin_reportinator].run_test_results_report(hash) do
      message = ''
      message = 'Unit test failures.' if (results[:counts][:failed] > 0)
      message
    end
  end

  def summary
    result_list = @ceedling[:file_path_utils].form_pass_results_filelist( PROJECT_TEST_RESULTS_PATH, COLLECTION_ALL_TESTS )

    # get test results for only those tests in our configuration and of those only tests with results on disk
    hash = {
      :header => '',
      :results => @ceedling[:plugin_reportinator].assemble_test_results(result_list, {:boom => false})
    }

    @ceedling[:plugin_reportinator].run_test_results_report(hash)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ceedling-0.0.16 new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
ceedling-0.0.15 new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
ceedling-0.0.14 new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
ceedling-0.0.13 new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
ceedling-0.0.12 new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
ceedling-0.0.8 new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
ceedling-0.0.7 new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
ceedling-0.0.5 new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb
ceedling-0.0.4 new_project_template/vendor/ceedling/plugins/stdout_pretty_tests_report/stdout_pretty_tests_report.rb