-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.rb
executable file
·50 lines (28 loc) · 1.59 KB
/
test.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env ruby
# frozen_string_literal: true
require "yaml"
# ------------------------------------------------------------------------------
actual = YAML.load_file("config/rubocop.yml")
if actual.keys.sort != ["Layout/HashAlignment", "Metrics/ClassLength", "Naming/MemoizedInstanceVariableName", "Style/ClassAndModuleChildren", "Style/EmptyMethod", "Style/StringLiterals", "Style/SymbolArray"]
raise
end
# ------------------------------------------------------------------------------
actual = YAML.load_file("config/rubocop/rails.yml")
raise if actual.keys.sort != ["Rails/SkipsModelValidations", "require"]
# ------------------------------------------------------------------------------
actual = YAML.load_file("config/rubocop/rspec.yml")
if actual.keys.sort != ["RSpec/ExampleLength", "RSpec/MultipleMemoizedHelpers", "RSpec/NamedSubject", "RSpec/NestedGroups", "require"]
raise
end
# ------------------------------------------------------------------------------
actual = YAML.load_file("config/rubocop/performance.yml")
raise if actual.keys.sort != ["require"]
# ------------------------------------------------------------------------------
actual = YAML.load_file("config/rubocop/rake.yml")
raise if actual.keys.sort != ["require"]
# ------------------------------------------------------------------------------
actual = YAML.load_file("config/rubocop/sequel.yml")
raise if actual.keys.sort != ["require"]
# ------------------------------------------------------------------------------
actual = YAML.load_file("config/rubocop/thread_safety.yml")
raise if actual.keys.sort != ["require"]