summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-04 18:03:58 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-04 18:03:58 +0200
commit4b2a31389f1e19d0cb0f442871793eec6869432e (patch)
treeaeb585e6024e9f4f3151c9efd83e935b4e975fea
parentd27a22a2ae198a2c573b6af4790b203a36ef7e80 (diff)
downloadgitlab-shell-4b2a31389f1e19d0cb0f442871793eec6869432e.tar.gz
init rspec
-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