summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile3
-rw-r--r--Gemfile.lock18
-rw-r--r--spec/gitlab_shell_spec.rb16
3 files changed, 37 insertions, 0 deletions
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..838c0e8
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,3 @@
+source "http://rubygems.org"
+
+gem 'rspec'
diff --git a/Gemfile.lock b/Gemfile.lock
new file mode 100644
index 0000000..b210821
--- /dev/null
+++ b/Gemfile.lock
@@ -0,0 +1,18 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ diff-lcs (1.1.3)
+ rspec (2.12.0)
+ rspec-core (~> 2.12.0)
+ rspec-expectations (~> 2.12.0)
+ rspec-mocks (~> 2.12.0)
+ rspec-core (2.12.2)
+ rspec-expectations (2.12.1)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.12.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rspec
diff --git a/spec/gitlab_shell_spec.rb b/spec/gitlab_shell_spec.rb
new file mode 100644
index 0000000..9a7e515
--- /dev/null
+++ b/spec/gitlab_shell_spec.rb
@@ -0,0 +1,16 @@
+require_relative '../lib/gitlab_shell'
+
+describe GitlabShell do
+
+ describe :initialize do
+ before do
+ ROOT_PATH = File.join(File.expand_path(File.dirname(__FILE__)), "..")
+ ENV['SSH_ORIGINAL_COMMAND'] = 'git-receive-pack'
+ ARGV = ['dzaporozhets']
+ @shell = GitlabShell.new
+ end
+
+ it { @shell.username.should == 'dzaporozhets' }
+ it { @shell.repos_path.should == "/home/git/repositories" }
+ end
+end