/
githubmirror
/
metasploit-framework
Обзор
Документация
Войти
/
githubmirror
/
metasploit-framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
spec/lib/rex/version_spec.rb
39 строк
1 KB
dwelch-r7
rubocop files and make the exclusions more localised
15 мар 2021, 16:27
15 мар 2021, 16:27
6aaf44c
Код
Авторство
О чём код?
require 'spec_helper' require 'rex/version' # rubocop:disable Lint/DeprecatedGemVersion RSpec.describe Rex::Version do context 'when version is nil' do let(:version) { nil } subject { Rex::Version.new(version) } it 'should be equivalent to a version of 0' do expect(subject).to eq Gem::Version.new(0) end it 'should be equivalent to a version of "0"' do expect(subject).to eq Gem::Version.new('0') end it 'should be equivalent to a version of empty string' do expect(subject).to eq Gem::Version.new('') end it 'should not be less than a version of 0' do expect(subject).not_to be < Gem::Version.new(0) end it 'should not be greater than a version of 0' do expect(subject).not_to be > Gem::Version.new(0) end it 'should be less than a version of "0.0.1"' do expect(subject).to be < Gem::Version.new('0.0.1') end it 'should not be greater than a version of "0.0.1"' do expect(subject).not_to be > Gem::Version.new('0.0.1') end end end # rubocop:enable Lint/DeprecatedGemVersion