diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 14 |
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' | |||
2 | require 'rspec/its' | 2 | require 'rspec/its' |
3 | require 'pronto/eslint' | 3 | require 'pronto/eslint' |
4 | 4 | ||
5 | RSpec.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 | ||
12 | end | 14 | end |
13 | 15 | ||
14 | RSpec.configure do |config| | 16 | RSpec.configure do |config| |