spec/unit/berkshelf/git_spec.rb in berkshelf-3.0.0.beta4 vs spec/unit/berkshelf/git_spec.rb in berkshelf-3.0.0.beta5

- old
+ new

@@ -1,11 +1,11 @@ require 'spec_helper' describe Berkshelf::Git do let(:git) { Berkshelf::Git } - describe '.find_git' do + describe '::find_git' do it 'finds git' do expect(Berkshelf::Git.find_git).to_not be_nil end it 'raises an error if git cannot be not found' do @@ -15,11 +15,11 @@ Berkshelf::Git.find_git }.to raise_error(Berkshelf::GitNotFound) end end - describe '.clone' do + describe '::clone' do let(:target) { clone_path('nginx') } it 'clones the repository to the target path' do origin_uri = git_origin_for('nginx') Berkshelf::Git.clone(origin_uri, target) @@ -27,11 +27,11 @@ expect(target).to exist expect(target).to be_directory end end - describe '.checkout' do + describe '::checkout' do let(:repo_path) { clone_path('nginx') } let(:repo) { origin_uri = git_origin_for('nginx', tags: ['1.0.1', '1.0.2'], branches: ['topic', 'next_topic']) git.clone(origin_uri, repo_path) } @@ -88,11 +88,11 @@ it_behaves_like 'able to checkout git ref', 'origin/topic' end end end - describe '.rev_parse' do + describe '::rev_parse' do let(:repo_path) { clone_path('nginx') } before(:each) do |example| origin_uri = git_origin_for('nginx', tags: ['1.1.1']) Berkshelf::Git.clone(origin_uri, repo_path) Berkshelf::Git.checkout(repo_path, sha_for_ref('nginx', '1.1.1')) @@ -104,11 +104,11 @@ expect(rev).to eql(ref) end end - describe '.show_ref' do + describe '::show_ref' do let(:repo_path) { clone_path('nginx') } let(:tags) { ['1.0.1'] } let(:branches) { ['topic'] } let!(:repo) { origin_uri = git_origin_for('nginx', tags: tags, branches: branches) @@ -138,11 +138,11 @@ }.to raise_error(Berkshelf::AmbiguousGitRef) end end end - describe '.revision_from_ref' do + describe '::revision_from_ref' do let(:repo_path) { clone_path('nginx') } let(:tags) { ['1.0.1'] } let(:branches) { ['topic'] } let!(:repo) { origin_uri = git_origin_for('nginx', tags: tags, branches: branches) @@ -186,11 +186,11 @@ let(:readonly_uri) { 'git://github.com/reset/thor-foodcritic.git' } let(:https_uri) { 'https://github.com/reset/solve.git' } let(:http_uri) { 'http://github.com/reset/solve.git' } let(:invalid_uri) { '/something/on/disk' } - describe '.validate_uri' do + describe '::validate_uri' do context 'given a valid Git read-only URI' do it 'returns true' do expect(Berkshelf::Git.validate_uri(readonly_uri)).to be_true end end @@ -260,10 +260,10 @@ expect(Berkshelf::Git.validate_uri(123)).to be_false end end end - describe '.validate_uri!' do + describe '::validate_uri!' do context 'given a valid Git read-only URI' do it 'returns true' do expect(Berkshelf::Git.validate_uri!(readonly_uri)).to be_true end end