]> git.immae.eu Git - github/fretlink/pronto-hlint.git/blob - spec/spec_helper.rb
add class variables to prepare setting external config
[github/fretlink/pronto-hlint.git] / spec / spec_helper.rb
1 require 'fileutils'
2 require 'rspec'
3 require 'rspec/its'
4 require 'pronto/eslint_npm'
5
6 %w(test eslintignore).each do |repo_name|
7 RSpec.shared_context "#{repo_name} repo" do
8 let(:git) { "spec/fixtures/#{repo_name}.git/git" }
9 let(:dot_git) { "spec/fixtures/#{repo_name}.git/.git" }
10
11 before { FileUtils.mv(git, dot_git) }
12 let(:repo) { Pronto::Git::Repository.new("spec/fixtures/#{repo_name}.git") }
13 after { FileUtils.mv(dot_git, git) }
14 end
15 end