diff options
author | Danilo Sousa <dsgoncalves@uoldiveo.com> | 2016-02-19 12:08:25 -0200 |
---|---|---|
committer | Danilo Sousa <dsgoncalves@uoldiveo.com> | 2016-02-19 12:08:58 -0200 |
commit | 66a0c3261611f737e5f36527da4ba0d13d70e092 (patch) | |
tree | 8a10d0ee76ad416a4a76e7362dbe62a8e26f756a | |
parent | 695883a75783e19de70e60314fab49661c387a22 (diff) |
fix 'GithubRepo#single_repo?' private method
-rw-r--r-- | lib/oxidized/hook/githubrepo.rb | 2 | ||||
-rw-r--r-- | 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 } |