From a02995e357c5b3734ad9acb4734678fc2f5c34ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Hendricksen?= Date: Sun, 29 May 2016 13:41:43 +0200 Subject: [PATCH] some more dep warnings --- core_specs/core/model/build_spec.rb | 10 +++++----- core_specs/core/model/job/cleanup_spec.rb | 2 +- core_specs/core/services/cancel_build_spec.rb | 3 +-- core_specs/core/services/cancel_job_spec.rb | 2 +- core_specs/core/services/find_build_spec.rb | 4 ++-- core_specs/core/services/find_job_spec.rb | 4 ++-- core_specs/core/services/find_log_spec.rb | 4 ++-- core_specs/core/services/regenerate_repo_key_spec.rb | 2 +- core_specs/core/services/remove_log_spec.rb | 4 ++-- 9 files changed, 17 insertions(+), 18 deletions(-) diff --git a/core_specs/core/model/build_spec.rb b/core_specs/core/model/build_spec.rb index 0439d0d4..5e43b209 100644 --- a/core_specs/core/model/build_spec.rb +++ b/core_specs/core/model/build_spec.rb @@ -103,7 +103,7 @@ describe Build, truncation: true do subject { Build.older_than(Build.new(number: 3)) } it "should limit the results" do - should have(2).items + expect(subject.size).to eq(2) end it "should return older than the passed build" do @@ -115,7 +115,7 @@ describe Build, truncation: true do subject { Build.older_than(3) } it "should limit the results" do - should have(2).items + expect(subject.size).to eq(2) end it "should return older than the passed build" do @@ -127,7 +127,7 @@ describe Build, truncation: true do subject { Build.older_than() } it "should limit the results" do - should have(2).item + expect(subject.size).to eq(2) end end end @@ -137,7 +137,7 @@ describe Build, truncation: true do 3.times { Factory(:build) } Build.stubs(:per_page).returns(1) - Build.descending.paged({}).should have(1).item + expect(Build.descending.paged({}).size).to eq(1) end it 'uses an offset' do @@ -145,7 +145,7 @@ describe Build, truncation: true do Build.stubs(:per_page).returns(1) builds = Build.descending.paged({page: 2}) - builds.should have(1).item + expect(builds.size).to eq(1) builds.first.number.should == '2' end end diff --git a/core_specs/core/model/job/cleanup_spec.rb b/core_specs/core/model/job/cleanup_spec.rb index 572e9da7..4115da19 100644 --- a/core_specs/core/model/job/cleanup_spec.rb +++ b/core_specs/core/model/job/cleanup_spec.rb @@ -37,7 +37,7 @@ # # it 'finishes the job' do # job.force_finish -# job.finished?.should be_true +# job.finished?.should be_truthy # end # end # end diff --git a/core_specs/core/services/cancel_build_spec.rb b/core_specs/core/services/cancel_build_spec.rb index 087ae1ed..9a708b29 100644 --- a/core_specs/core/services/cancel_build_spec.rb +++ b/core_specs/core/services/cancel_build_spec.rb @@ -48,8 +48,7 @@ describe Travis::Services::CancelBuild do it 'should not be able to cancel job if user does not have any permissions' do user.permissions.destroy_all - service.can_cancel?.should be_false + service.can_cancel?.should be false end end end - diff --git a/core_specs/core/services/cancel_job_spec.rb b/core_specs/core/services/cancel_job_spec.rb index d076250d..abf5bb2b 100644 --- a/core_specs/core/services/cancel_job_spec.rb +++ b/core_specs/core/services/cancel_job_spec.rb @@ -37,7 +37,7 @@ describe Travis::Services::CancelJob do it 'should not be able to cancel job if user does not have pull permission' do user.permissions.destroy_all - service.can_cancel?.should be_false + service.can_cancel?.should be false end end end diff --git a/core_specs/core/services/find_build_spec.rb b/core_specs/core/services/find_build_spec.rb index b1a13861..ca229e80 100644 --- a/core_specs/core/services/find_build_spec.rb +++ b/core_specs/core/services/find_build_spec.rb @@ -56,12 +56,12 @@ describe Travis::Services::FindBuild do # describe 'final?' do # it 'returns true if the build is finished' do # build.update_attributes!(:state => :errored) - # service.final?.should be_true + # service.final?.should be_truthy # end # it 'returns false if the build is not finished' do # build.update_attributes!(:state => :started) - # service.final?.should be_false + # service.final?.should be false # end # end end diff --git a/core_specs/core/services/find_job_spec.rb b/core_specs/core/services/find_job_spec.rb index 93206fca..85d954b5 100644 --- a/core_specs/core/services/find_job_spec.rb +++ b/core_specs/core/services/find_job_spec.rb @@ -50,12 +50,12 @@ describe Travis::Services::FindJob do # describe 'final?' do # it 'returns true if the job is finished' do # job.update_attributes!(state: :errored) - # service.final?.should be_true + # service.final?.should be_truthy # end # it 'returns false if the job is not finished' do # job.update_attributes!(state: :started) - # service.final?.should be_false + # service.final?.should be false # end # end end diff --git a/core_specs/core/services/find_log_spec.rb b/core_specs/core/services/find_log_spec.rb index c3ca32ce..190ff21f 100644 --- a/core_specs/core/services/find_log_spec.rb +++ b/core_specs/core/services/find_log_spec.rb @@ -31,12 +31,12 @@ describe Travis::Services::FindLog do # describe 'final?' do # it 'returns true if the job is finished' do # log.job.update_attributes!(:state => :finished) - # service.final?.should be_true + # service.final?.should be_truthy # end # it 'returns false if the job is not finished' do # log.job.update_attributes!(:state => :started) - # service.final?.should be_false + # service.final?.should be false # end # end end diff --git a/core_specs/core/services/regenerate_repo_key_spec.rb b/core_specs/core/services/regenerate_repo_key_spec.rb index 61c983bc..487839f0 100644 --- a/core_specs/core/services/regenerate_repo_key_spec.rb +++ b/core_specs/core/services/regenerate_repo_key_spec.rb @@ -23,7 +23,7 @@ describe Travis::Services::RegenerateRepoKey do it 'does not regenerate key' do user.permissions.destroy_all repo.expects(:regenerate_key!).never - service.run.should be_false + service.run.should be_falsey end end end diff --git a/core_specs/core/services/remove_log_spec.rb b/core_specs/core/services/remove_log_spec.rb index 40e128cf..5475d0d5 100644 --- a/core_specs/core/services/remove_log_spec.rb +++ b/core_specs/core/services/remove_log_spec.rb @@ -46,8 +46,8 @@ describe Travis::Services::RemoveLog do it 'runs successfully' do result = service.run result.removed_by.should == user - result.removed_at.should be_true - result.should be_true + result.removed_at.should be_truthy + result.should be_truthy end it "updates logs with desired information" do