class M::Frameworks
def self.framework_runner
def self.framework_runner new.framework_runner end
def self.minitest4?
def self.minitest4? minitest_version_major == "4" end
def self.minitest5?
def self.minitest5? minitest_version_major == "5" end
def self.minitest_version_major
def self.minitest_version_major if defined?(Minitest::Unit::VERSION) Minitest::Unit::VERSION.slice(/\d+/) elsif defined?(Minitest::VERSION) Minitest::VERSION.slice(/\d+/) end end
def self.test_unit?
def self.test_unit? defined?(Test::Unit) end
def framework_runner
def framework_runner if minitest5? Runners::Minitest5.new elsif minitest4? Runners::Minitest4.new elsif test_unit? Runners::TestUnit.new else Runners::UnsupportedFramework.new end end
def minitest4?
def minitest4? self.class.minitest4? end
def minitest5?
def minitest5? self.class.minitest5? end
def test_unit?
def test_unit? self.class.test_unit? end