Exemplo n.º 1
0
 def test_install_gem_raises_exception_on_failure(self, *args, **kwargs):
     with self.assertRaises(SystemExit) as cm:
         pkg.install_gem('non_existing_gem')
     self.assertEqual(cm.exception.code, 1)
Exemplo n.º 2
0
 def test_install_gem_returns_True_on_success(self, *args, **kwargs):
     self.assertTrue(pkg.install_gem('small'))
Exemplo n.º 3
0
 def test_install_gem_installs_gem(self, *args, **kwargs):
     pkg.install_gem('small')
     self.assertTrue('small' in run('gem list'))
Exemplo n.º 4
0
 def test_install_gem_raises_exception_on_failure(self, *args, **kwargs):
     with self.assertRaises(SystemExit) as cm:
         pkg.install_gem('non_existing_gem')
     self.assertEqual(cm.exception.code, 1)
Exemplo n.º 5
0
 def test_install_gem_returns_True_on_success(self, *args, **kwargs):
     self.assertTrue(pkg.install_gem('small'))
Exemplo n.º 6
0
 def test_install_gem_installs_gem(self, *args, **kwargs):
     pkg.install_gem('small')
     self.assertTrue('small' in run('gem list'))