spec/rake/funnel/support/timing/report_spec.rb in rake-funnel-0.21.2 vs spec/rake/funnel/support/timing/report_spec.rb in rake-funnel-0.22.0

- old
+ new

@@ -9,11 +9,11 @@ allow($stdout).to receive(:puts) allow(Kernel).to receive(:warn) subject.render end - shared_examples_for :report do + shared_examples_for 'report' do it 'should separator lines' do expect($stdout).to have_received(:puts) .with(Regexp.new('-' * described_class::HEADER_WIDTH)).exactly(4).times end @@ -47,22 +47,22 @@ end describe 'empty report', include: Rake::Funnel::Support::Timing do let(:stats) { Rake::Funnel::Support::Timing::Statistics.new } - it_behaves_like :report + it_behaves_like 'report' end describe 'report for 2 tasks' do let(:stats) do s = Rake::Funnel::Support::Timing::Statistics.new s.benchmark(task(:foo)) {} s.benchmark(task(:bar)) {} s end - it_behaves_like :report + it_behaves_like 'report' it 'should print each task' do expect($stdout).to have_received(:puts).with(/^foo/) expect($stdout).to have_received(:puts).with(/^bar/) end @@ -93,11 +93,11 @@ diff = subject.columns.first.header.length - task_name.to_s.length diff = 0 if diff < 0 diff + described_class::SPACE end - shared_examples_for :padding do + shared_examples_for 'padding' do it 'should pad headers' do expect($stdout).to have_received(:puts) .with(Regexp.new("^#{subject.columns[0].header}\\s{#{header_space}}#{subject.columns[1].header}")) end @@ -111,15 +111,15 @@ end context 'task names are shorter than headers' do let(:task_name) { :a } - it_behaves_like :padding + it_behaves_like 'padding' end context 'task names are longer than headers' do let(:task_name) { :aaaaaaaaaaaa } - it_behaves_like :padding + it_behaves_like 'padding' end end end