diff --git a/.rubocop.yml b/.rubocop.yml index bdae9aa9..a511077c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -8,3 +8,5 @@ Metrics/LineLength: Max: 88 # Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config` +Metrics/BlockLength: + Max: 36 diff --git a/bin/kitchen b/bin/kitchen index 621b13ac..dcfdb4ca 100755 --- a/bin/kitchen +++ b/bin/kitchen @@ -18,8 +18,11 @@ if File.file?(bundle_binstub) if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ load(bundle_binstub) else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + abort( + 'Your `bin/bundle` was not generated by Bundler, '\ + 'so this binstub cannot run. Replace `bin/bundle` by running '\ + '`bundle binstubs bundler --force`, then run this command again.' + ) end end diff --git a/test/integration/default/controls/config_spec.rb b/test/integration/default/controls/config_spec.rb index 2abbc708..a6cd92d7 100644 --- a/test/integration/default/controls/config_spec.rb +++ b/test/integration/default/controls/config_spec.rb @@ -8,7 +8,11 @@ it { should be_owned_by 'root' } it { should be_grouped_into 'root' } its('mode') { should cmp '0644' } - its('content') { should include 'This is another example file from SaltStack template-formula.' } + its('content') do + should include( + 'This is another example file from SaltStack template-formula.' + ) + end its('content') { should include '"added_in_pillar": "pillar_value"' } its('content') { should include '"added_in_defaults": "defaults_value"' } its('content') { should include '"added_in_lookup": "lookup_value"' } @@ -16,7 +20,15 @@ its('content') { should include '"lookup": {"added_in_lookup": "lookup_value",' } its('content') { should include '"pkg": {"name": "' } its('content') { should include '"service": {"name": "' } - its('content') { should include '"tofs": {"files_switch": ["any/path/can/be/used/here", "id", "roles", "osfinger", "os", "os_family"], "source_files": {"template-config-file-file-managed": ["example.tmpl.jinja"], "template-subcomponent-config-file-file-managed": ["subcomponent-example.tmpl.jinja"]}' } + its('content') do + should include( + '"tofs": {"files_switch": ["any/path/can/be/used/here", "id", '\ + '"roles", "osfinger", "os", "os_family"], "source_files": '\ + '{"template-config-file-file-managed": ["example.tmpl.jinja"], '\ + '"template-subcomponent-config-file-file-managed": '\ + '["subcomponent-example.tmpl.jinja"]}' + ) + end its('content') { should include '"arch": "amd64"' } its('content') { should include '"winner": "pillar"}' } its('content') { should include 'winner of the merge: pillar' } diff --git a/test/integration/default/controls/subcomponent_config_spec.rb b/test/integration/default/controls/subcomponent_config_spec.rb index fff76870..d880cfc8 100644 --- a/test/integration/default/controls/subcomponent_config_spec.rb +++ b/test/integration/default/controls/subcomponent_config_spec.rb @@ -8,7 +8,18 @@ it { should be_owned_by 'root' } it { should be_grouped_into 'root' } its('mode') { should cmp '0644' } - its('content') { should include '# File managed by Salt at .' } - its('content') { should include 'This is another subcomponent example file from SaltStack template-formula.' } + its('content') do + should include( + '# File managed by Salt at '\ + '.' + ) + end + its('content') do + should include( + 'This is another subcomponent example file from SaltStack '\ + 'template-formula.' + ) + end end end