diff options
author | James Lopez <james@jameslopez.es> | 2016-02-17 20:29:43 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-02-17 20:29:43 +0300 |
commit | c110c9bd7f2fabb5c9397291f1f13c6accab70e6 (patch) | |
tree | 7e848929421f3c14c1784284bf1a209a63939e8b /spec/services/git_push_service_spec.rb | |
parent | 5255a54df9778b107734a84acb85230d62d3cff7 (diff) |
refactored spec
Diffstat (limited to 'spec/services/git_push_service_spec.rb')
-rw-r--r-- | spec/services/git_push_service_spec.rb | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb index 48e796b6946..994585fb32c 100644 --- a/spec/services/git_push_service_spec.rb +++ b/spec/services/git_push_service_spec.rb @@ -14,10 +14,17 @@ describe GitPushService, services: true do end describe 'Push branches' do + + let(:oldrev) { @oldrev } + let(:newrev) { @newrev } + + subject do + execute_service(project, user, oldrev, newrev, @ref ) + end + context 'new branch' do - subject do - execute_service(project, user, @blankrev, @newrev, @ref ) - end + + let(:oldrev) { @blankrev } it { is_expected.to be_truthy } @@ -35,9 +42,6 @@ describe GitPushService, services: true do end context 'existing branch' do - subject do - execute_service(project, user, @oldrev, @newrev, @ref ) - end it { is_expected.to be_truthy } @@ -49,9 +53,8 @@ describe GitPushService, services: true do end context 'rm branch' do - subject do - execute_service(project, user, @oldrev, @blankrev, @ref ) - end + + let(:newrev) { @blankrev } it { is_expected.to be_truthy } |