diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-05-21 17:49:06 -0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-22 12:13:46 +0200 |
commit | 5a9ede472150ec78f8410ae15cf782095c8f056c (patch) | |
tree | 5cbdbfb971329960011e8b3a3544e583f9551f6c /spec/lib/extracts_path_spec.rb | |
parent | dad88568f34bfda5f7fe34672bc5099c80226138 (diff) | |
download | gitlab-ce-5a9ede472150ec78f8410ae15cf782095c8f056c.tar.gz |
Update mock and stub syntax for specs
Diffstat (limited to 'spec/lib/extracts_path_spec.rb')
-rw-r--r-- | spec/lib/extracts_path_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/lib/extracts_path_spec.rb b/spec/lib/extracts_path_spec.rb index 05bcebaa3a2..8e05e44defc 100644 --- a/spec/lib/extracts_path_spec.rb +++ b/spec/lib/extracts_path_spec.rb @@ -9,8 +9,11 @@ describe ExtractsPath do before do @project = project - project.stub(repository: double(ref_names: ['master', 'foo/bar/baz', 'v1.0.0', 'v2.0.0'])) - project.stub(path_with_namespace: 'gitlab/gitlab-ci') + + repo = double(ref_names: ['master', 'foo/bar/baz', 'v1.0.0', 'v2.0.0']) + allow(project).to receive(:repository).and_return(repo) + allow(project).to receive(:path_with_namespace). + and_return('gitlab/gitlab-ci') end describe '#assign_ref' do |