aboutsummaryrefslogtreecommitdiffhomepage
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 4d1ff71..5769c2d 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -2,13 +2,15 @@ require 'rspec'
2require 'rspec/its' 2require 'rspec/its'
3require 'pronto/eslint' 3require 'pronto/eslint'
4 4
5RSpec.shared_context 'test repo' do 5%w(test eslintignore).each do |repo_name|
6 let(:git) { 'spec/fixtures/test.git/git' } 6 RSpec.shared_context "#{repo_name} repo" do
7 let(:dot_git) { 'spec/fixtures/test.git/.git' } 7 let(:git) { "spec/fixtures/#{repo_name}.git/git" }
8 let(:dot_git) { "spec/fixtures/#{repo_name}.git/.git" }
8 9
9 before { FileUtils.mv(git, dot_git) } 10 before { FileUtils.mv(git, dot_git) }
10 let(:repo) { Pronto::Git::Repository.new('spec/fixtures/test.git') } 11 let(:repo) { Pronto::Git::Repository.new("spec/fixtures/#{repo_name}.git") }
11 after { FileUtils.mv(dot_git, git) } 12 after { FileUtils.mv(dot_git, git) }
13 end
12end 14end
13 15
14RSpec.configure do |config| 16RSpec.configure do |config|