diff options
author | Markus Doits <doits@users.noreply.github.com> | 2018-03-31 18:46:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-31 18:46:32 +0200 |
commit | 016e77289de983d0e7e46ac38aa4a84448388f41 (patch) | |
tree | 199de267f89a7d17752a8540eeee0922c40700ce /spec/spec_helper.rb | |
parent | ed98da4ce890259abc2d82006325be9f37e69908 (diff) | |
parent | c89a62b8e91dc1329aee92392eb32a51a25a8315 (diff) | |
download | pronto-hlint-016e77289de983d0e7e46ac38aa4a84448388f41.tar.gz pronto-hlint-016e77289de983d0e7e46ac38aa4a84448388f41.tar.zst pronto-hlint-016e77289de983d0e7e46ac38aa4a84448388f41.zip |
Merge pull request #10 from doits/refactor_config_handling
refactor config handling and specs a little bit
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 9 |
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' | |||
17 | end | 17 | end |
18 | 18 | ||
19 | RSpec.shared_context 'with config', config: true do | 19 | RSpec.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) } | ||
26 | end | 25 | end |