diff options
Diffstat (limited to 'spec/lib/gitlab_spec.rb')
-rw-r--r-- | spec/lib/gitlab_spec.rb | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/spec/lib/gitlab_spec.rb b/spec/lib/gitlab_spec.rb index 6ac3d115bc6..5f7a0cca351 100644 --- a/spec/lib/gitlab_spec.rb +++ b/spec/lib/gitlab_spec.rb @@ -70,82 +70,6 @@ describe Gitlab do end end - describe '.final_release?' do - subject { described_class.final_release? } - - context 'returns the corrent boolean value' do - it 'is false for a pre release' do - stub_const('Gitlab::VERSION', '11.0.0-pre') - - expect(subject).to be false - end - - it 'is false for a release candidate' do - stub_const('Gitlab::VERSION', '11.0.0-rc2') - - expect(subject).to be false - end - - it 'is true for a final release' do - stub_const('Gitlab::VERSION', '11.0.2') - - expect(subject).to be true - end - end - end - - describe '.minor_release' do - subject { described_class.minor_release } - - it 'returns the minor release of the full GitLab version' do - stub_const('Gitlab::VERSION', '11.0.1-rc3') - - expect(subject).to eql '11.0' - end - end - - describe '.previous_release' do - subject { described_class.previous_release } - - context 'it should return the previous release' do - it 'returns the previous major version when GitLab major version is not final' do - stub_const('Gitlab::VERSION', '11.0.1-pre') - - expect(subject).to eql '10' - end - - it 'returns the current minor version when the GitLab patch version is RC and > 0' do - stub_const('Gitlab::VERSION', '11.2.1-rc3') - - expect(subject).to eql '11.2' - end - - it 'returns the previous minor version when the GitLab patch version is RC and 0' do - stub_const('Gitlab::VERSION', '11.2.0-rc3') - - expect(subject).to eql '11.1' - end - end - end - - describe '.new_major_release?' do - subject { described_class.new_major_release? } - - context 'returns the corrent boolean value' do - it 'is true when the minor version is 0 and the patch is a pre release' do - stub_const('Gitlab::VERSION', '11.0.1-pre') - - expect(subject).to be true - end - - it 'is false when the minor version is above 0' do - stub_const('Gitlab::VERSION', '11.2.1-rc3') - - expect(subject).to be false - end - end - end - describe '.com?' do it 'is true when on GitLab.com' do stub_config_setting(url: 'https://gitlab.com') |