diff --git a/.gitignore b/.gitignore index 0105887..fccf9ce 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,10 @@ Gemfile.lock src/testup/ui/js/*.* src/testup/ui/images/* + +############ +## Yard +############ + +.yardoc/ +doc/ diff --git a/.yardopts b/.yardopts new file mode 100644 index 0000000..a1fd510 --- /dev/null +++ b/.yardopts @@ -0,0 +1,7 @@ +--title "TestUp 2 for SketchUp - A GUI wrapper for running Minitest in SketchUp" +--no-private +--markup markdown +src/**/*.rb +- +README.md +LICENSE diff --git a/src/testup/api.rb b/src/testup/api.rb index 6e016af..59943d5 100644 --- a/src/testup/api.rb +++ b/src/testup/api.rb @@ -129,7 +129,7 @@ def self.run_test_suite(test_suite, options: {}) # @param [String] title # @param [String] path # @param [Array] results - # @result [Report::TestSuite] + # @return [Report::TestSuite] def self.test_suite_from_results(title, path, results) tests = {} results.each { |result| diff --git a/src/testup/command.rb b/src/testup/command.rb index d70b745..18431fa 100644 --- a/src/testup/command.rb +++ b/src/testup/command.rb @@ -3,7 +3,7 @@ module TestUp # return a UI::Command object. So instead this module is used that will extend # the instance created with it's #create method. # -# @example +# @example Creating a Command object: # cmd = Command.create('Hello World') { # Extension.hello_world # } diff --git a/src/testup/core.rb b/src/testup/core.rb index 7007cc5..eed9162 100644 --- a/src/testup/core.rb +++ b/src/testup/core.rb @@ -83,7 +83,7 @@ def self.toggle_verbose_console_tests end # TODO(thomthom): Move this method. Maybe to the Reporter class if the - # @num_tests_being_run instance variable also can be moved there. + # `@num_tests_being_run`` instance variable also can be moved there. def self.update_testing_progress(num_tests_run) progress = TaskbarProgress.new progress.set_value(num_tests_run, @num_tests_being_run) diff --git a/src/testup/coverage.rb b/src/testup/coverage.rb index d00d912..3b7a393 100644 --- a/src/testup/coverage.rb +++ b/src/testup/coverage.rb @@ -11,7 +11,7 @@ module TestUp # TODO: Rename to CoverageDiscoverer class Coverage - # @param [String] settings_id + # @param [String] testsuite_path def initialize(testsuite_path) unless File.directory?(testsuite_path) raise ArgumentError, "Not a valid directory: #{testsuite_path}" diff --git a/src/testup/coverage_discoverer.rb b/src/testup/coverage_discoverer.rb index 01558f4..ab002c6 100644 --- a/src/testup/coverage_discoverer.rb +++ b/src/testup/coverage_discoverer.rb @@ -25,7 +25,7 @@ def report(discovered_suite) private - # @param [Array] expected + # @param [Array] expected_test_case # @param [Array] missing # @return [Float] def compute_percentage(expected_test_case, missing) diff --git a/src/testup/log.rb b/src/testup/log.rb index 742bf7a..68e779b 100644 --- a/src/testup/log.rb +++ b/src/testup/log.rb @@ -31,7 +31,7 @@ def self.set_tracing(category, enabled) end # @param [Symbol] category - # @param [Boolean] + # @return [Boolean] def self.tracing(category) @trace[category] || false end diff --git a/src/testup/manifest.rb b/src/testup/manifest.rb index 7c9318e..1e20e52 100644 --- a/src/testup/manifest.rb +++ b/src/testup/manifest.rb @@ -13,7 +13,7 @@ class Manifest attr_reader :filename - # @param [String] filename + # @param [String] manifest_filename def initialize(manifest_filename) @filename = manifest_filename @expected = parse_manifest(manifest_filename) diff --git a/src/testup/report/collection.rb b/src/testup/report/collection.rb index 379d262..e5114dd 100644 --- a/src/testup/report/collection.rb +++ b/src/testup/report/collection.rb @@ -17,7 +17,7 @@ module TestUp module Report class Collection < SortedSet - # @param [Integer, #hash] + # @param [Integer, #hash] value def [](value) # return @hash.keys[value] if value.is_a?(Integer) return each.to_a[value] if value.is_a?(Integer) diff --git a/src/testup/report/test.rb b/src/testup/report/test.rb index 0a2abd5..57f8fde 100644 --- a/src/testup/report/test.rb +++ b/src/testup/report/test.rb @@ -47,7 +47,7 @@ def hash @id.hash end - # @param [Report::Test] + # @param [Report::Test] test # @return [Boolean] def merge_result(test) return false if test.result.nil? diff --git a/src/testup/report/test_coverage.rb b/src/testup/report/test_coverage.rb index c1454dc..a2cc2f7 100644 --- a/src/testup/report/test_coverage.rb +++ b/src/testup/report/test_coverage.rb @@ -27,7 +27,7 @@ def self.from_hash(hash) end # @param [Float] percent - # @param [Hash, Array] + # @param [Hash, Array] missing def initialize(percent, missing) @percent = percent.to_f @missing = restructure(missing) diff --git a/src/testup/report/test_suite.rb b/src/testup/report/test_suite.rb index ebeb693..385f219 100644 --- a/src/testup/report/test_suite.rb +++ b/src/testup/report/test_suite.rb @@ -93,14 +93,14 @@ def rediscover(other_test_suite) self end - # @param [Report::TestCase, Symbol, String] + # @param [Report::TestCase, Symbol, String] test_case # @return [Report::TestCase] def test_case(test_case) @test_cases[test_case] end alias_method :[], :test_case - # @param [Report::TestCase, String] + # @param [Report::TestCase, String] test_case def test_case?(test_case) !test_case(test_case).nil? end diff --git a/src/testup/sketchup_test_utilities.rb b/src/testup/sketchup_test_utilities.rb index aa257fb..820c353 100644 --- a/src/testup/sketchup_test_utilities.rb +++ b/src/testup/sketchup_test_utilities.rb @@ -334,7 +334,7 @@ def assert_no_notification end # @param [String] event - # @param [Integer] argument + # @param [Integer] argument_index # @param [Class] type # @param [Object] expected def assert_callback_data(event, argument_index, type, expected) diff --git a/src/testup/test_discoverer.rb b/src/testup/test_discoverer.rb index 1823c68..28d6d9c 100644 --- a/src/testup/test_discoverer.rb +++ b/src/testup/test_discoverer.rb @@ -116,7 +116,7 @@ def discover_testcases(testsuite_path) } end - # @param [Array] testsuite_paths + # @param [Array] testsuite_path # @return [Array] Path to all test case files found. def discover_testcase_source_files(testsuite_path) # Log.debug ">>> #{self.class}.discover_testcase_source_files(...)" diff --git a/src/testup/ui/runner.rb b/src/testup/ui/runner.rb index 8f4f210..8e1857d 100644 --- a/src/testup/ui/runner.rb +++ b/src/testup/ui/runner.rb @@ -225,7 +225,7 @@ def discover_tests nil end - # @param [Report::TestSuite] test_suite + # @param [Report::TestSuite] test_suites # @return [nil] def rediscover_tests(test_suites) Log.trace :discover, "rediscover_tests(...)"