diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a28f73a01..de61065fa 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2022-03-09 21:00:49 UTC using RuboCop version 1.22.3. +# on 2023-08-17 21:27:12 UTC using RuboCop version 1.50.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -19,26 +19,29 @@ Lint/MissingSuper: Exclude: - 'spec/serverspec_type_zabbixapi.rb' -# Offense count: 7 +# Offense count: 1 # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. -# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to +# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to Naming/MethodParameterName: Exclude: - 'lib/puppet/provider/zabbix_proxy/ruby.rb' - - 'lib/puppet/type/zabbix_host.rb' - - 'lib/puppet/type/zabbix_template.rb' -# Offense count: 4 +# Offense count: 3 +# This cop supports unsafe autocorrection (--autocorrect-all). +RSpec/BeEq: + Exclude: + - 'spec/acceptance/zabbix_proxy_spec.rb' + - 'spec/unit/puppet/type/zabbix_template_spec.rb' + +# Offense count: 1 +# This cop supports unsafe autocorrection (--autocorrect-all). RSpec/EmptyExampleGroup: Exclude: - 'spec/classes/agent_spec.rb' - - 'spec/classes/javagateway_spec.rb' - - 'spec/classes/server_spec.rb' -# Offense count: 4 +# Offense count: 2 RSpec/RepeatedExampleGroupDescription: Exclude: - - 'spec/classes/database_mysql_spec.rb' - 'spec/defines/startup_spec.rb' # Offense count: 1 diff --git a/spec/unit/puppet/type/zabbix_template_spec.rb b/spec/unit/puppet/type/zabbix_template_spec.rb index 085a83271..9f650dcb5 100644 --- a/spec/unit/puppet/type/zabbix_template_spec.rb +++ b/spec/unit/puppet/type/zabbix_template_spec.rb @@ -116,9 +116,7 @@ content EOS FileUtils.mkdir_p '/path/to' - File.open(mock_template_source_file, 'w') do |f| - f.write mock_file_content - end + File.write(mock_template_source_file, mock_file_content) expect(property.source_xml).to eq mock_file_content end end