Sha256: 6504a84860c69dd9d63468abe12dbe80a46ba80e72cdb94d255cf3961af5a743
Contents?: true
Size: 959 Bytes
Versions: 1
Compression:
Stored size: 959 Bytes
Contents
module M class Frameworks 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.minitest5? minitest_version_major == "5" end def self.minitest4? minitest_version_major == "4" end def self.test_unit? defined?(Test::Unit) end def self.framework_runner new.framework_runner end 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 private def minitest5? self.class.minitest5? end def minitest4? self.class.minitest4? end def test_unit? self.class.test_unit? end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
m-1.6.2 | lib/m/frameworks.rb |