From 743bd721ee68001428c8562316f63124dce531dc Mon Sep 17 00:00:00 2001 From: Nikolay Kondratyev Date: Tue, 1 Aug 2017 13:08:25 +0500 Subject: [PATCH] test: eliminate deprecation warnings --- resque-integration.gemspec | 1 + spec/resque/integration/configuration_spec.rb | 12 ++++++------ spec/spec_helper.rb | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/resque-integration.gemspec b/resque-integration.gemspec index 19cf8ed..091c922 100644 --- a/resque-integration.gemspec +++ b/resque-integration.gemspec @@ -36,6 +36,7 @@ Gem::Specification.new do |gem| gem.add_development_dependency 'bundler' gem.add_development_dependency 'rspec', '~> 2.14' + gem.add_development_dependency 'rspec-its' gem.add_development_dependency 'simplecov' gem.add_development_dependency 'appraisal', '>= 1.0.2' gem.add_development_dependency 'combustion', '>= 0.5.5' diff --git a/spec/resque/integration/configuration_spec.rb b/spec/resque/integration/configuration_spec.rb index 84f3a5a..a2f6749 100644 --- a/spec/resque/integration/configuration_spec.rb +++ b/spec/resque/integration/configuration_spec.rb @@ -33,25 +33,25 @@ describe '#resque_scheduler?' do context 'when default' do - it { expect(config.resque_scheduler?).to be_true } + it { expect(config.resque_scheduler?).to be_truthy } end context 'when defined' do let(:config_yaml) { {'resque' => {'scheduler' => 'no'}} } - it { expect(config.resque_scheduler?).to be_false } + it { expect(config.resque_scheduler?).to be_falsey } end end describe '#run_at_exit_hooks?' do context 'when default' do - it { expect(config.resque_scheduler?).to be_true } + it { expect(config.resque_scheduler?).to be_truthy } end context 'when defined' do let(:config_yaml) { {'resque' => {'run_at_exit_hooks' => 'no'}} } - it { expect(config.run_at_exit_hooks?).to be_false } + it { expect(config.run_at_exit_hooks?).to be_falsey } end end end @@ -61,7 +61,7 @@ subject(:config) { described_class::new(nil) } it { should_not be_enabled } - its(:include_payload?) { should be_true } + its(:include_payload?) { should be_truthy } its(:to) { should be_empty } its(:from) { should eq 'no_reply@gmail.com' } its(:mail) { should eq :alert } @@ -81,7 +81,7 @@ subject(:config) { described_class::new(configuration) } it { should_not be_enabled } - its(:include_payload?) { should be_false } + its(:include_payload?) { should be_falsey } its(:to) { should include 'to1@mail' } its(:to) { should include 'to2@mail' } its(:from) { should eq 'from@mail' } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c60b7d9..ddd4983 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,6 @@ -# coding: utf-8 require 'bundler/setup' require 'rspec' +require 'rspec/its' require 'resque' require 'simplecov' require 'mock_redis'