Exemplo n.º 1
0
    def test_fails_validation_with_multiple_podspecs(self):
        with temp_directory():
            touch('URITemplate2.podspec.json')
            touch('URITemplate.podspec.json')

            with self.assertRaises(Exception):
                CocoaPodsReleaser()
Exemplo n.º 2
0
    def test_detect_current_version_json_podspec(self):
        fixture_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                                    'fixtures')
        podspec = os.path.join(fixture_path, 'URITemplate.podspec.json')

        with temp_directory():
            shutil.copyfile(podspec, 'URITemplate.podspec.json')
            version = CocoaPodsReleaser().determine_current_version()
            self.assertEqual(version, Version('1.2.0'))
Exemplo n.º 3
0
    def test_detect_current_version_ruby_podspec(self):
        fixture_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                                    'fixtures')
        podspec = os.path.join(fixture_path, 'JSONWebToken.podspec')

        with temp_directory():
            shutil.copyfile(podspec, 'JSONWebToken.podspec')
            version = CocoaPodsReleaser().determine_current_version()
            self.assertEqual(version, Version('1.4.1'))
Exemplo n.º 4
0
    def test_bumps_ruby_podspec(self):
        fixture_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                                    'fixtures')
        podspec = os.path.join(fixture_path, 'JSONWebToken.podspec')
        bumped_podspec = os.path.join(fixture_path,
                                      'BumpedJSONWebToken.podspec')

        with temp_directory():
            shutil.copyfile(podspec, 'JSONWebToken.podspec')
            CocoaPodsReleaser().bump('2.0.0')
            self.assertTrue(filecmp.cmp('JSONWebToken.podspec',
                                        bumped_podspec))
Exemplo n.º 5
0
    def test_bumps_json_podspec(self):
        fixture_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
                                    'fixtures')
        podspec = os.path.join(fixture_path, 'URITemplate.podspec.json')
        bumped_podspec = os.path.join(fixture_path,
                                      'BumpedURITemplate.podspec.json')

        with temp_directory():
            shutil.copyfile(podspec, 'URITemplate.podspec.json')
            CocoaPodsReleaser().bump('1.2.1')
            self.assertTrue(
                filecmp.cmp('URITemplate.podspec.json', bumped_podspec))
Exemplo n.º 6
0
 def test_detects_json_podspec(self):
     with temp_directory():
         touch('URITemplate.podspec.json')
         self.assertTrue(CocoaPodsReleaser.detect())
Exemplo n.º 7
0
 def test_detects_ruby_podspec(self):
     with temp_directory():
         touch('JSONWebToken.podspec')
         self.assertTrue(CocoaPodsReleaser.detect())
Exemplo n.º 8
0
 def test_passes_validation_with_ruby_spec(self):
     with temp_directory():
         touch('JSONWebToken.podspec')
         CocoaPodsReleaser()
Exemplo n.º 9
0
 def test_passes_validation_with_json_spec(self):
     with temp_directory():
         touch('URITemplate.podspec.json')
         CocoaPodsReleaser()
Exemplo n.º 10
0
 def test_detects_json_podspec(self):
     with temp_directory():
         touch('URITemplate.podspec.json')
         self.assertTrue(CocoaPodsReleaser.detect())
Exemplo n.º 11
0
 def test_detects_ruby_podspec(self):
     with temp_directory():
         touch('JSONWebToken.podspec')
         self.assertTrue(CocoaPodsReleaser.detect())