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:
authorLin Jen-Shin <godfat@godfat.org>2018-06-14 16:04:44 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-06-21 11:32:07 +0300
commit562f357ba5cf59f8325a87b9fba178e4c9830ad5 (patch)
tree7e35c58c3296497e5f3f34dd9c727c4c57b91c87 /spec/lib/gitlab/legacy_github_import
parent7c11ed8c916a10f6d9c32635986008b48410531f (diff)
Implement `expect_next_instance_of` and use it
We need this because `expect_any_instance_of` doesn't work on prepended models. Now we could use the same code between CE/EE
Diffstat (limited to 'spec/lib/gitlab/legacy_github_import')
-rw-r--r--spec/lib/gitlab/legacy_github_import/project_creator_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb b/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
index 972b17d5b12..3d4240fa4ba 100644
--- a/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
+++ b/spec/lib/gitlab/legacy_github_import/project_creator_spec.rb
@@ -17,7 +17,10 @@ describe Gitlab::LegacyGithubImport::ProjectCreator do
before do
namespace.add_owner(user)
- allow_any_instance_of(Project).to receive(:add_import_job)
+
+ expect_next_instance_of(Project) do |project|
+ expect(project).to receive(:add_import_job)
+ end
end
describe '#execute' do