From 23c8332f133e55a8c88cc4771ad25cea17294a34 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 17 Nov 2016 20:40:28 +0200 Subject: Absorb gitlab_git @ 6b077df2b68158cf8e069e3ffd6359aff038a438 --- spec/gitlab_git_spec_helper.rb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 spec/gitlab_git_spec_helper.rb (limited to 'spec/gitlab_git_spec_helper.rb') 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 -- cgit v1.2.1