diff options
| author | Ash McKenzie <amckenzie@gitlab.com> | 2018-12-12 13:25:37 +1100 |
|---|---|---|
| committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-12-13 14:22:09 +1100 |
| commit | adcdea2a732c6cdf3281281b69579c0aad9c6bf4 (patch) | |
| tree | c3db905b0890895303b2f1ca91f3ac02664ce48a /spec | |
| parent | 18824bd30d23b26f36331dedeb390c5b4fac7184 (diff) | |
| download | gitlab-shell-sh-bump-ruby-version.tar.gz | |
More accurate expaction around warning outputsh-bump-ruby-version
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/gitlab_logger_spec.rb | 6 | ||||
| -rw-r--r-- | spec/spec_helper.rb | 2 |
2 files changed, 1 insertions, 7 deletions
diff --git a/spec/gitlab_logger_spec.rb b/spec/gitlab_logger_spec.rb index b0ec792..d5704c3 100644 --- a/spec/gitlab_logger_spec.rb +++ b/spec/gitlab_logger_spec.rb @@ -8,11 +8,7 @@ describe :convert_log_level do end it "converts invalid log level to Logger::INFO" do - case CURRENT_RUBY_VERSION - when '2.5' - expect(Warning).to receive(:warn).at_least(:once) - end - + expect { convert_log_level(:extreme) }.to output(/WARNING: Unrecognized log level :extreme. Falling back to INFO./).to_stderr expect(convert_log_level(:extreme)).to eq(Logger::INFO) end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e3aca4e..dfdf449 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,8 +4,6 @@ SimpleCov.start require 'gitlab_init' -CURRENT_RUBY_VERSION = "#{RbConfig::CONFIG['MAJOR']}.#{RbConfig::CONFIG['MINOR']}" - Dir[File.expand_path('support/**/*.rb', __dir__)].each { |f| require f } RSpec.configure do |config| |
