def test_install_system_gem_raises_exception_on_failure(self, *args, **kwargs): with self.assertRaises(SystemExit) as cm: pkg.install_system_gem('non_existing_gem') self.assertEqual(cm.exception.code, 1)
def test_install_system_gem_returns_True_on_success(self, *args, **kwargs): self.assertTrue(pkg.install_system_gem('small'))
def test_install_system_gem_installs_gem(self, *args, **kwargs): pkg.install_system_gem('small') self.assertTrue('small' in sudo('gem list'))
def test_install_system_gem_raises_exception_on_failure( self, *args, **kwargs): with self.assertRaises(SystemExit) as cm: pkg.install_system_gem('non_existing_gem') self.assertEqual(cm.exception.code, 1)