diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-06-14 16:04:44 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-06-21 11:32:07 +0300 |
commit | 562f357ba5cf59f8325a87b9fba178e4c9830ad5 (patch) | |
tree | 7e35c58c3296497e5f3f34dd9c727c4c57b91c87 /spec/lib/gitlab/google_code_import | |
parent | 7c11ed8c916a10f6d9c32635986008b48410531f (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/google_code_import')
-rw-r--r-- | spec/lib/gitlab/google_code_import/project_creator_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/lib/gitlab/google_code_import/project_creator_spec.rb b/spec/lib/gitlab/google_code_import/project_creator_spec.rb index 24cd518c77b..b959e006292 100644 --- a/spec/lib/gitlab/google_code_import/project_creator_spec.rb +++ b/spec/lib/gitlab/google_code_import/project_creator_spec.rb @@ -16,7 +16,9 @@ describe Gitlab::GoogleCodeImport::ProjectCreator do end it 'creates project' do - 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 project_creator = described_class.new(repo, namespace, user) project = project_creator.execute |