spec/gurke/reporters/default_reporter_spec.rb in gurke-3.2.2 vs spec/gurke/reporters/default_reporter_spec.rb in gurke-3.3.1

- old
+ new

@@ -173,16 +173,37 @@ describe '#retry_scenario' do let(:scenario) { double('scenario') } subject { reporter.retry_scenario(scenario); super() } - it do - is_expected.to eq unindent <<~TEXT - . - . Retry flaky scenario due to previous failure: - . - . - TEXT + context 'with normal scenario' do + before do + allow(scenario).to receive(:flaky?).and_return(false) + end + + it do + is_expected.to eq unindent <<~TEXT + . + . Retry scenario due to previous failure: + . + . + TEXT + end + end + + context 'with flaky scenario' do + before do + allow(scenario).to receive(:flaky?).and_return(true) + end + + it do + is_expected.to eq unindent <<~TEXT + . + . Retry flaky scenario due to previous failure: + . + . + TEXT + end end end describe '#after_scenario' do let(:scenario) { double('scenario') }