summaryrefslogtreecommitdiff
path: root/spec/gitlab_post_receive_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/gitlab_post_receive_spec.rb')
-rw-r--r--spec/gitlab_post_receive_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/gitlab_post_receive_spec.rb b/spec/gitlab_post_receive_spec.rb
new file mode 100644
index 0000000..a9a4e13
--- /dev/null
+++ b/spec/gitlab_post_receive_spec.rb
@@ -0,0 +1,18 @@
+require 'spec_helper'
+require 'gitlab_post_receive'
+
+describe GitlabPostReceive do
+ let(:repository_path) { "/home/git/repositories" }
+ let(:repo_name) { 'dzaporozhets/gitlab-ci' }
+ let(:repo_path) { File.join(repository_path, repo_name) + ".git" }
+ let(:gitlab_post_receive) { GitlabPostReceive.new(repo_path, 'key-123', 'wow') }
+
+ before do
+ GitlabConfig.any_instance.stub(repos_path: repository_path)
+ end
+
+ describe :initialize do
+ it { gitlab_post_receive.repo_path.should == repo_path }
+ it { gitlab_post_receive.changes.should == ['wow'] }
+ end
+end