Пример #1
0
def all(logger, include_paths, directory, module_name):
	releases = pip_probe.run(logger, include_paths, directory, module_name)
	releases += gem_probe.run()
	releases += dpkg_probe.run()
	releases += npm_probe.run(directory)

	return releases
Пример #2
0
    def test_no_gems_installed(self, Popen):
        """
        Should return an empty list if there are no gems installed
        """
        Popen.return_value = MockPopen().empty_result()

        releases = gem_probe.run()
        self.assertEqual(releases, [])
Пример #3
0
 def test_gem_not_installed(self, exec_cmd):
     """
     Should return an empty list the gem is not installed
     """
     exec_cmd.return_value = []
     
     releases = gem_probe.run()
     self.assertEqual(releases, [])
Пример #4
0
    def test_module_type(self, Popen):
        """
        Should send the proper module_type
        """
        Popen.return_value = MockPopen().valid_result()

        releases = gem_probe.run()
        for release in releases:
            self.assertEqual(release.module.module_type, 'gem')
Пример #5
0
    def test_installed_gems_as_list(self, Popen):
        """
        Should return a list of installed gems
        """
        Popen.return_value = MockPopen().valid_result()

        # see fixtures/gem_probe
        expected = [
            Release(Module('chunky_png', 'gem'), '1.2.8'),
            Release(Module('compass', 'gem'), '0.12.2'),
            Release(Module('fssm', 'gem'), '0.2.10'),
            Release(Module('sass', 'gem'), '3.2.7')]

        releases = gem_probe.run()
        self.assertEqual(releases, expected)