+require 'fileutils'
+require 'byebug'
require 'rspec'
-require 'rspec/its'
require 'pronto/eslint_npm'
%w(test eslintignore).each do |repo_name|
end
end
-RSpec.configure do |config|
- config.expect_with(:rspec) { |c| c.syntax = :should }
- config.mock_with(:rspec) { |c| c.syntax = :should }
+RSpec.shared_context 'with config', config: true do
+ requested_config = metadata[:config].to_yaml
+
+ let(:config_path) { File.join(repo.path.to_s, Pronto::ESLintNpm::CONFIG_FILE) }
+
+ before(:each) { File.write(config_path, requested_config) }
+ after(:each) { FileUtils.rm(config_path) }
end