import shutil
import unittest
from coalib.bears.requirements.GemRequirement import GemRequirement


@unittest.skipIf(shutil.which('gem') is None, "Gem is not installed.")
class GemRequirementTestCase(unittest.TestCase):

    def test_installed_requirement(self):
        self.assertTrue(GemRequirement('ruby').is_installed())

    def test_not_installed_requirement(self):
        self.assertFalse(GemRequirement('some_bad_package').is_installed())

@@ -1,12 +1,28 @@
+import platform%0A
 import shuti
@@ -111,55 +111,278 @@
 ent%0A
-%0A%0A@unittest.skipIf(shutil.which('gem') is None,
+from coalib.misc.Shell import call_without_output%0A%0Acmd = %5B'gem', 'list', '-i', 'ruby'%5D%0Aif platform.system() == 'Windows':  # pragma: no cover%0A    cmd = %5B'cmd', '/c'%5D + cmd%0A%0A%0A@unittest.skipIf(shutil.which('gem') is None or bool(call_without_output(cmd)),%0A                
  %22Ge

Fix skipping for tests