Sha256: 98e20825baf8fe0cbac00a61593bde29349e35318145bebbe955b807ee04b139
Contents?: true
Size: 869 Bytes
Versions: 2
Compression:
Stored size: 869 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe DatadogBackup::Deprecations do subject(:check) { described_class.check } let(:logger) { instance_double(Logger) } before do stub_const('LOGGER', logger) allow(logger).to receive(:warn) end %w[2.5.9 2.6.8 2.7 3.0.4].each do |ruby_version| describe "#check#{ruby_version}" do it 'does warn' do stub_const('RUBY_VERSION', ruby_version) check expect(logger).to have_received(:warn).with(/ruby-#{ruby_version} is deprecated./) end end end %w[3.1.2 3.2.0-preview1].each do |ruby_version| describe "#check#{ruby_version}" do it 'does not warn' do stub_const('RUBY_VERSION', ruby_version) check expect(logger).not_to have_received(:warn).with(/ruby-#{ruby_version} is deprecated./) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
datadog_backup-4.0.1 | spec/datadog_backup/deprecations_spec.rb |
datadog_backup-4.0.0 | spec/datadog_backup/deprecations_spec.rb |