From 212da35bb8529609e3d3aa1ce643ce1551ec36ea Mon Sep 17 00:00:00 2001 From: Jerome Dalbert Date: Sun, 11 Sep 2016 17:13:47 +0200 Subject: Load YAML configuration correctly --- lib/pronto/eslint_npm.rb | 2 +- spec/pronto/eslint_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/pronto/eslint_npm.rb b/lib/pronto/eslint_npm.rb index 9ff7df5..bb79091 100644 --- a/lib/pronto/eslint_npm.rb +++ b/lib/pronto/eslint_npm.rb @@ -4,7 +4,7 @@ require 'shellwords' module Pronto class ESLintNpm < Runner CONFIG_FILE = '.pronto_eslint_npm.yml'.freeze - CONFIG_KEYS = %i(eslint_executable files_to_lint).freeze + CONFIG_KEYS = %w(eslint_executable files_to_lint).freeze attr_writer :eslint_executable diff --git a/spec/pronto/eslint_spec.rb b/spec/pronto/eslint_spec.rb index 6358621..e354ba4 100644 --- a/spec/pronto/eslint_spec.rb +++ b/spec/pronto/eslint_spec.rb @@ -39,7 +39,7 @@ module Pronto context( 'with files to lint config that never matches', - config: { files_to_lint: 'will never match' } + config: { 'files_to_lint' => 'will never match' } ) do it 'returns zero errors' do expect(run.count).to eql(0) @@ -48,7 +48,7 @@ module Pronto context( 'with files to lint config that matches only .js', - config: { files_to_lint: /\.js/ } + config: { 'files_to_lint' => /\.js/ } ) do it 'returns correct amount of errors' do expect(run.count).to eql(2) @@ -57,7 +57,7 @@ module Pronto context( 'with different eslint executable', - config: { eslint_executable: './custom_eslint.sh' } + config: { 'eslint_executable' => './custom_eslint.sh' } ) do it 'calls the custom eslint eslint_executable' do expect { run }.to raise_error(JSON::ParserError, /custom eslint called/) -- cgit v1.2.3