class Guard::JRubyMinitest
Attributes
reloaders[R]
Public Class Methods
new(options = {})
click to toggle source
Calls superclass method
# File lib/guard/jruby-minitest.rb, line 24 def initialize(options = {}) @custom_watchers = options[:watchers] general_watchers = [Watcher.new(%r{^(.+)\.rb$}), Watcher.new(%r{^(.+)\.(erb|haml)$})] TestPaths.test_folders = options[:test_folders] super(options.merge(watchers: general_watchers)) end
template(plugin_location)
click to toggle source
# File lib/guard/jruby-minitest.rb, line 44 def self.template(plugin_location) File.read("#{ plugin_location }/lib/guard/jruby-minitest/templates/Guardfile") end
Public Instance Methods
run_all()
click to toggle source
Calls superclass method
# File lib/guard/jruby-minitest.rb, line 31 def run_all unload_previous_tests super end
Private Instance Methods
matched_paths(raw_paths)
click to toggle source
# File lib/guard/jruby-minitest.rb, line 50 def matched_paths(raw_paths) [].tap do |paths| raw_paths.each do |p| @custom_watchers.each do |w| if (m = w.match(p)) paths << (w.action.nil? ? p : w.call_action(m)) end end end end end
reload_application(paths)
click to toggle source
# File lib/guard/jruby-minitest.rb, line 62 def reload_application(paths) self.class.reloaders.each do |reloader| reloader.run(paths) end end
unload_previous_tests()
click to toggle source
# File lib/guard/jruby-minitest.rb, line 68 def unload_previous_tests if Utils.minitest_version_gte_5? ::Minitest::Test.reset else ::MiniTest::Unit::TestCase.reset end end