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.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index b3d8596..c05f072 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -17,10 +17,9 @@ require 'pronto/eslint_npm'
17end 17end
18 18
19RSpec.shared_context 'with config', config: true do 19RSpec.shared_context 'with config', config: true do
20 requested_config = metadata[:config].to_yaml 20 requested_config = metadata[:config]
21 21
22 let(:config_path) { File.join(repo.path.to_s, Pronto::ESLintNpm::CONFIG_FILE) } 22 before(:each) do
23 23 allow_any_instance_of(Pronto::ESLintNpm).to receive(:config_options).and_return(requested_config)
24 before(:each) { File.write(config_path, requested_config) } 24 end
25 after(:each) { FileUtils.rm(config_path) }
26end 25end