From 13f37264349d1c9a016335ba37c6f5bd2d5910df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C5=82gorzata=20Ksionek?= Date: Mon, 27 May 2019 12:44:02 +0200 Subject: Rephrase specs description for cycle analytics --- spec/serializers/analytics_stage_serializer_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'spec') diff --git a/spec/serializers/analytics_stage_serializer_spec.rb b/spec/serializers/analytics_stage_serializer_spec.rb index 907d1b35e74..5b05c2f2ef3 100644 --- a/spec/serializers/analytics_stage_serializer_spec.rb +++ b/spec/serializers/analytics_stage_serializer_spec.rb @@ -27,7 +27,7 @@ describe AnalyticsStageSerializer do allow_any_instance_of(Gitlab::CycleAnalytics::BaseStage).to receive(:median).and_return(0) end - it 'value is nil' do + it 'sets the value to nil' do expect(subject.fetch(:value)).to be_nil end end @@ -37,18 +37,18 @@ describe AnalyticsStageSerializer do allow_any_instance_of(Gitlab::CycleAnalytics::BaseStage).to receive(:median).and_return(0.12) end - it 'value is equal to median' do + it 'sets the value to equal to median' do expect(subject.fetch(:value)).to eq('less than a minute') end end context 'when median is above 1' do before do - allow_any_instance_of(Gitlab::CycleAnalytics::BaseStage).to receive(:median).and_return(1.12) + allow_any_instance_of(Gitlab::CycleAnalytics::BaseStage).to receive(:median).and_return(60.12) end - it 'value is equal to median' do - expect(subject.fetch(:value)).to eq('less than a minute') + it 'sets the value to equal to median' do + expect(subject.fetch(:value)).to eq('1 minute') end end end -- cgit v1.2.1