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/bitbucket_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/bitbucket_import')
-rw-r--r-- | spec/lib/gitlab/bitbucket_import/project_creator_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/lib/gitlab/bitbucket_import/project_creator_spec.rb b/spec/lib/gitlab/bitbucket_import/project_creator_spec.rb index c3f528dd6fc..ed6fa3d229f 100644 --- a/spec/lib/gitlab/bitbucket_import/project_creator_spec.rb +++ b/spec/lib/gitlab/bitbucket_import/project_creator_spec.rb @@ -25,7 +25,9 @@ describe Gitlab::BitbucketImport::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, 'vim', namespace, user, access_params) project = project_creator.execute |