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.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 72a128b..da4fc00 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,6 +1,5 @@
1require 'fileutils' 1require 'fileutils'
2require 'rspec' 2require 'rspec'
3require 'rspec/its'
4require 'pronto/eslint_npm' 3require 'pronto/eslint_npm'
5 4
6%w(test eslintignore).each do |repo_name| 5%w(test eslintignore).each do |repo_name|
@@ -13,3 +12,12 @@ require 'pronto/eslint_npm'
13 after { FileUtils.mv(dot_git, git) } 12 after { FileUtils.mv(dot_git, git) }
14 end 13 end
15end 14end
15
16RSpec.shared_context 'with config', config: true do
17 requested_config = metadata[:config].to_yaml
18
19 let(:config_path) { File.join(repo.path.to_s, Pronto::ESLintNpm::CONFIG_FILE) }
20
21 before(:each) { File.write(config_path, requested_config) }
22 after(:each) { FileUtils.rm(config_path) }
23end