From 66a0c3261611f737e5f36527da4ba0d13d70e092 Mon Sep 17 00:00:00 2001 From: Danilo Sousa Date: Fri, 19 Feb 2016 12:08:25 -0200 Subject: fix 'GithubRepo#single_repo?' private method --- lib/oxidized/hook/githubrepo.rb | 2 +- spec/githubrepo_spec.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/oxidized/hook/githubrepo.rb b/lib/oxidized/hook/githubrepo.rb index 0c98460..dd9520b 100644 --- a/lib/oxidized/hook/githubrepo.rb +++ b/lib/oxidized/hook/githubrepo.rb @@ -63,7 +63,7 @@ class GithubRepo < Oxidized::Hook end def single_repo? - Oxidized.config.git.single_repo? + Oxidized.config.output.git.single_repo? end end diff --git a/spec/githubrepo_spec.rb b/spec/githubrepo_spec.rb index 4674035..a5bbeca 100644 --- a/spec/githubrepo_spec.rb +++ b/spec/githubrepo_spec.rb @@ -132,12 +132,13 @@ describe GithubRepo do repo.expects(:remotes).twice.returns(remotes) remotes.expects(:[]).with('origin').returns(nil) - remotes.expects(:create).with('origin', 'ggrroouupp#remote_repo').returns(remote) + remotes.expects(:create).with('origin', create_remote).returns(remote) remote.expects(:url).returns('url') remote.expects(:push).with(['refs/heads/master'], credentials: credentials).returns(true) end describe 'when there are several repositories' do + let(:create_remote) { 'ggrroouupp#remote_repo' } let(:repository) { './ggrroouupp.git' } let(:single_repo) { nil } @@ -148,6 +149,7 @@ describe GithubRepo do end describe 'when is a single repository' do + let(:create_remote) { 'github_repo_hook#remote_repo' } let(:repository) { 'foo.git' } let(:single_repo) { true } -- cgit v1.2.1