diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-11-17 20:40:28 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-11-18 15:40:04 +0200 |
commit | 23c8332f133e55a8c88cc4771ad25cea17294a34 (patch) | |
tree | d4f16bd25b325ee25694d4819de815c4a529076d /spec/gitlab_git_spec_helper.rb | |
parent | aea8baed3093c513560e9ac5ac0c5c99508d3001 (diff) | |
download | gitlab-ce-absorb-gitlab-git.tar.gz |
Absorb gitlab_git @ 6b077df2b68158cf8e069e3ffd6359aff038a438absorb-gitlab-git
Diffstat (limited to 'spec/gitlab_git_spec_helper.rb')
-rw-r--r-- | spec/gitlab_git_spec_helper.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/gitlab_git_spec_helper.rb b/spec/gitlab_git_spec_helper.rb new file mode 100644 index 00000000000..d0b1111b3e4 --- /dev/null +++ b/spec/gitlab_git_spec_helper.rb @@ -0,0 +1,30 @@ +require "spec_helper" + +require 'simplecov' +SimpleCov.start + +require 'pry' +require 'rspec/its' + +RSpec::Matchers.define :be_valid_commit do + match do |actual| + actual && + actual.id == SeedRepo::Commit::ID && + actual.message == SeedRepo::Commit::MESSAGE && + actual.author_name == SeedRepo::Commit::AUTHOR_FULL_NAME + end +end + +GITLAB_GIT_REPOS_PATH = Rails.root.join('tmp', 'gitlab_git_tests').to_s +TEST_REPO_PATH = File.join(GITLAB_GIT_REPOS_PATH, 'gitlab-git-test.git') +TEST_NORMAL_REPO_PATH = File.join(GITLAB_GIT_REPOS_PATH, "not-bare-repo.git") +TEST_MUTABLE_REPO_PATH = File.join(GITLAB_GIT_REPOS_PATH, "mutable-repo.git") +TEST_BROKEN_REPO_PATH = File.join(GITLAB_GIT_REPOS_PATH, "broken-repo.git") + +RSpec.configure do |config| + config.run_all_when_everything_filtered = true + config.filter_run :focus + config.order = 'random' + config.include SeedHelper + config.before(:all) { ensure_seeds } +end |