Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-18 00:08:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-18 00:08:29 +0300
commit40254b9ace2a74a3c9f1cc51a1b1d5e3e78c1ae9 (patch)
tree9b735ef933178be36d35088f3acab2d9b75dbbad /spec/services/namespaces
parent22a0d312ae82e7dda3073d5d1a5a766d7641738d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/namespaces')
-rw-r--r--spec/services/namespaces/statistics_refresher_service_spec.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/services/namespaces/statistics_refresher_service_spec.rb b/spec/services/namespaces/statistics_refresher_service_spec.rb
index 9d42e917efe..1fa0a794edd 100644
--- a/spec/services/namespaces/statistics_refresher_service_spec.rb
+++ b/spec/services/namespaces/statistics_refresher_service_spec.rb
@@ -17,7 +17,9 @@ describe Namespaces::StatisticsRefresherService, '#execute' do
end
it 'recalculate the namespace statistics' do
- expect_any_instance_of(Namespace::RootStorageStatistics).to receive(:recalculate!).once
+ expect_next_instance_of(Namespace::RootStorageStatistics) do |instance|
+ expect(instance).to receive(:recalculate!).once
+ end
service.execute(group)
end
@@ -45,8 +47,9 @@ describe Namespaces::StatisticsRefresherService, '#execute' do
context 'when something goes wrong' do
before do
- allow_any_instance_of(Namespace::RootStorageStatistics)
- .to receive(:recalculate!).and_raise(ActiveRecord::ActiveRecordError)
+ allow_next_instance_of(Namespace::RootStorageStatistics) do |instance|
+ allow(instance).to receive(:recalculate!).and_raise(ActiveRecord::ActiveRecordError)
+ end
end
it 'raises RefreshError' do