Object
# File lib/guard/minitest/runner.rb, line 8 def initialize(options = {}) @options = { all_after_pass: false, bundler: File.exist?("#{Dir.pwd}/Gemfile"), rubygems: false, drb: false, zeus: false, spring: false, all_env: {}, env: {}, include: [], test_folders: ]test spec], test_file_patterns: ]*_test.rb test_*.rb *_spec.rb], cli: nil, autorun: true }.merge(options) parse_deprecated_options [:test_folders, :test_file_patterns].each do |k| @options[k] = Array(@options[k]).uniq.compact end @inspector = Inspector.new(test_folders, test_file_patterns) end
# File lib/guard/minitest/runner.rb, line 34 def run(paths, options = {}) return unless options[:all] || !paths.empty? message = "Running: #{options[:all] ? 'all tests' : paths.join(' ')}" UI.info message, reset: true status = _run_command(paths, options[:all]) # When using zeus or spring, the Guard::Minitest::Reporter can't be used because the minitests run in another # process, but we can use the exit status of the client process to distinguish between :success and :failed. if zeus? || spring? ::Guard::Notifier.notify(message, title: 'Minitest results', image: status ? :success : :failed) end if @options[:all_after_pass] && status && !options[:all] run_all else status end end
# File lib/guard/minitest/runner.rb, line 55 def run_all paths = inspector.clean_all run(paths, all: true) end
# File lib/guard/minitest/runner.rb, line 65 def run_on_additions(paths) inspector.clear_memoized_test_files true end
Generated with the Darkfish Rdoc Generator 2.