Sha256: 8501ffe7ef0915309519c56d10d8e4a5e84be0fa485d65c62591afd220d66baf
Contents?: true
Size: 1.46 KB
Versions: 14
Compression:
Stored size: 1.46 KB
Contents
require 'spec_helper' describe Targit do describe Targit::Release do let(:basic_release) do VCR.use_cassette('release_object') do Targit::Release.new 'akerl/targit', 'testing', authfile: 'spec/.creds' end end it 'exposes the release object' do expect(basic_release.data[:tag_name]).to eql 'testing' end it 'exposes the repo name' do expect(basic_release.repo).to eql 'akerl/targit' end it 'exposes the tag name' do expect(basic_release.tag).to eql 'testing' end it 'does not create a new release by default' do VCR.use_cassette('no_release_found') do expect do Targit::Release.new( 'akerl/targit', 'new_release', authfile: 'spec/.creds' ) end.to raise_error RuntimeError, /No release found/ end end it 'creates the repo if called with :create = true' do VCR.use_cassette('create_new_release') do release = Targit::Release.new( 'akerl/targit', 'new_release', create: true, authfile: 'spec/.creds' ) expect(release.repo).to eql 'akerl/targit' end end it 'uses the provided release name if given' do VCR.use_cassette('create_named_release') do release = Targit::Release.new( 'akerl/targit', 'new_release', create: 'special', authfile: 'spec/.creds' ) expect(release.data[:name]).to eql 'special' end end end end
Version data entries
14 entries across 14 versions & 1 rubygems