diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-04 18:03:58 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-04 18:03:58 +0200 |
commit | 4b2a31389f1e19d0cb0f442871793eec6869432e (patch) | |
tree | aeb585e6024e9f4f3151c9efd83e935b4e975fea | |
parent | d27a22a2ae198a2c573b6af4790b203a36ef7e80 (diff) | |
download | gitlab-shell-4b2a31389f1e19d0cb0f442871793eec6869432e.tar.gz |
init rspec
-rw-r--r-- | Gemfile | 3 | ||||
-rw-r--r-- | Gemfile.lock | 18 | ||||
-rw-r--r-- | spec/gitlab_shell_spec.rb | 16 |
3 files changed, 37 insertions, 0 deletions
@@ -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 |