Sha256: 8ebad69c3f3d77942bf3206f95ff762bcbe089ec39b6c15d88d90bcc99362401
Contents?: true
Size: 999 Bytes
Versions: 24
Compression:
Stored size: 999 Bytes
Contents
require 'helper' class TestPlatform < Test::Unit::TestCase include CSD context "A Gem::Platform object for this machine" do setup do Options.clear end should "try to get kernel information if this is linux even in reveal mode" do if Gem::Platform.local.os == 'linux' Options.reveal = true assert Gem::Platform.local.kernel_release assert Gem::Platform.local.kernel_version end end should "know whether it's debian or not" do assert !Gem::Platform.local.debian? if Gem::Platform.local.os == 'darwin' # TODO: This is not the best way to determine debian or red hat assert Gem::Platform.local.debian? if Gem::Platform.local.os == 'linux' and Cmd.run('which dpkg', :internal => true, :die_on_failure => false).success? assert !Gem::Platform.local.debian? if Gem::Platform.local.os == 'linux' and Cmd.run('which rpm', :internal => true, :die_on_failure => false).success? end end end
Version data entries
24 entries across 24 versions & 1 rubygems