spec/rake/funnel/integration/teamcity/progress_report_spec.rb in rake-funnel-0.21.2 vs spec/rake/funnel/integration/teamcity/progress_report_spec.rb in rake-funnel-0.22.0

- old
+ new

@@ -1,8 +1,6 @@ -# rubocop:disable RSpec/FilePath - -describe Rake::Funnel::Integration::TeamCity::ProgressReport do +describe Rake::Funnel::Integration::TeamCity::ProgressReport do # rubocop:disable RSpec/FilePath include Rake::DSL let(:teamcity_running?) { false } let(:teamcity_rake_runner?) { false } @@ -24,11 +22,11 @@ after do subject.disable! end - shared_examples :block_report do + shared_examples 'block report' do it 'should write block start' do expect(Rake::Funnel::Integration::TeamCity::ServiceMessages).to \ have_received(:block_opened).with(name: 'task') end @@ -36,11 +34,11 @@ expect(Rake::Funnel::Integration::TeamCity::ServiceMessages).to \ have_received(:block_closed).with(name: 'task') end end - shared_examples :no_block_report do + shared_examples 'no block report' do it 'should not write block start' do expect(Rake::Funnel::Integration::TeamCity::ServiceMessages).not_to \ have_received(:block_opened) end @@ -61,24 +59,24 @@ expect(Rake::Funnel::Integration::TeamCity::ServiceMessages).not_to \ have_received(:build_problem) end context 'not on TeamCity' do - it_behaves_like :no_block_report + it_behaves_like 'no block report' end context 'on TeamCity' do let(:teamcity_running?) { true } context 'without rake runner' do - it_behaves_like :block_report + it_behaves_like 'block report' end context 'with rake runner' do let(:teamcity_rake_runner?) { true } - it_behaves_like :no_block_report + it_behaves_like 'no block report' end end end context 'when task fails' do @@ -109,11 +107,11 @@ @raised_error = e end end context 'not on TeamCity' do - it_behaves_like :no_block_report + it_behaves_like 'no block report' it 'should not swallow the error' do expect(@raised_error).to be_a_kind_of(SpecificError) # rubocop:disable RSpec/InstanceVariable end end @@ -139,11 +137,11 @@ .with(hash_including(description: have(4000).items)) end end context 'without rake runner' do - it_behaves_like :block_report + it_behaves_like 'block report' it 'should report the error as a build problem' do expect(Rake::Funnel::Integration::TeamCity::ServiceMessages).to \ have_received(:build_problem) end @@ -158,10 +156,10 @@ it 'should report the inner error as a build problem (as it will be wrapped in a ApplicationAbortedException)' do # rubocop:disable Metrics/LineLength expect(Rake::Funnel::Integration::TeamCity::ServiceMessages).to \ have_received(:build_problem).with(description: 'inner message') end - it_behaves_like :no_block_report + it_behaves_like 'no block report' end end end context 'when progess report was disabled' do