File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 66
77* [ #184 ] ( https://github.com/rubocop-hq/rubocop-rails/issues/184 ) : Fix ` Rake/Environment ` to allow task with no block. ([ @hanachin ] [ ] )
88* [ #122 ] ( https://github.com/rubocop-hq/rubocop-rails/issues/122 ) : Fix ` Exclude ` paths that were not inherited. ([ @koic ] [ ] )
9+ * [ #187 ] ( https://github.com/rubocop-hq/rubocop-rails/pull/187 ) : Fix an issue that excluded files in rubocop-rails did not work. ([ @sinsoku ] [ ] )
910
1011## 2.4.1 (2019-12-25)
1112
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ module Inject
88 def self . defaults!
99 path = CONFIG_DEFAULT . to_s
1010 hash = ConfigLoader . send ( :load_yaml_configuration , path )
11- config = Config . new ( hash , path )
11+ config = Config . new ( hash , path ) . tap ( & :make_excludes_absolute )
1212 puts "configuration from #{ path } " if ConfigLoader . debug?
1313 config = ConfigLoader . merge_with_default ( config , path , unset_nil : false )
1414 ConfigLoader . instance_variable_set ( :@default_configuration , config )
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ RSpec . describe RuboCop ::Rails ::Inject do
4+ describe '#defaults!' do
5+ before { allow ( Dir ) . to receive ( :pwd ) . and_return ( '/home/foo/project' ) }
6+
7+ it 'makes excludes absolute' do
8+ configuration = described_class . defaults!
9+ expect ( configuration [ 'AllCops' ] [ 'Exclude' ] )
10+ . to include (
11+ '/home/foo/project/bin/*' ,
12+ '/home/foo/project/db/schema.rb'
13+ )
14+ end
15+ end
16+ end
You can’t perform that action at this time.
0 commit comments