commit c82b960ad4293947acbff27429bad5639d3a4692
Author: Steve Traylen <steve.traylen@cern.ch>
Date:   Thu Dec 16 14:55:03 2021 +0100

    rubocop:auto_correct results

diff --git a/spec/classes/ip_nat_spec.rb b/spec/classes/ip_nat_spec.rb
index fb89c30..238176d 100644
--- a/spec/classes/ip_nat_spec.rb
+++ b/spec/classes/ip_nat_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require 'spec_helper'
 
 describe 'nftables' do
@@ -10,229 +12,245 @@ describe 'nftables' do
       it { is_expected.to compile }
 
       it {
-        is_expected.to contain_concat('nftables-ip-nat').with(
-          path:   '/etc/nftables/puppet-preflight/ip-nat.nft',
+        expect(subject).to contain_concat('nftables-ip-nat').with(
+          path: '/etc/nftables/puppet-preflight/ip-nat.nft',
           ensure: 'present',
-          owner:  'root',
-          group:  'root',
-          mode:   '0640'
+          owner: 'root',
+          group: 'root',
+          mode: '0640'
         )
       }
 
       it {
-        is_expected.to contain_concat__fragment('nftables-ip-nat-header').with(
-          target:  'nftables-ip-nat',
+        expect(subject).to contain_concat__fragment('nftables-ip-nat-header').with(
+          target: 'nftables-ip-nat',
           content: %r{^table ip nat \{$},
-          order:   '00'
+          order: '00'
         )
       }
 
       it {
-        is_expected.to contain_concat__fragment('nftables-ip-nat-body').with(
-          target:  'nftables-ip-nat',
+        expect(subject).to contain_concat__fragment('nftables-ip-nat-body').with(
+          target: 'nftables-ip-nat',
           content: %r{^\s+include "ip-nat-chain-\*\.nft"$},
-          order:   '98'
+          order: '98'
         )
       }
 
       it {
-        is_expected.to contain_concat__fragment('nftables-ip-nat-footer').with(
-          target:  'nftables-ip-nat',
+        expect(subject).to contain_concat__fragment('nftables-ip-nat-footer').with(
+          target: 'nftables-ip-nat',
           content: %r{^\}$},
-          order:   '99'
+          order: '99'
         )
       }
 
       it {
-        is_expected.to contain_concat('nftables-ip6-nat').with(
-          path:   '/etc/nftables/puppet-preflight/ip6-nat.nft',
+        expect(subject).to contain_concat('nftables-ip6-nat').with(
+          path: '/etc/nftables/puppet-preflight/ip6-nat.nft',
           ensure: 'present',
-          owner:  'root',
-          group:  'root',
-          mode:   '0640'
+          owner: 'root',
+          group: 'root',
+          mode: '0640'
         )
       }
 
       it {
-        is_expected.to contain_concat__fragment('nftables-ip6-nat-header').with(
-          target:  'nftables-ip6-nat',
+        expect(subject).to contain_concat__fragment('nftables-ip6-nat-header').with(
+          target: 'nftables-ip6-nat',
           content: %r{^table ip6 nat \{$},
-          order:   '00'
+          order: '00'
         )
       }
 
       it {
-        is_expected.to contain_concat__fragment('nftables-ip6-nat-body').with(
-          target:  'nftables-ip6-nat',
+        expect(subject).to contain_concat__fragment('nftables-ip6-nat-body').with(
+          target: 'nftables-ip6-nat',
           content: %r{^\s+include "ip6-nat-chain-\*\.nft"$},
-          order:   '98'
+          order: '98'
         )
       }
 
       it {
-        is_expected.to contain_concat__fragment('nftables-ip6-nat-footer').with(
-          target:  'nftables-ip6-nat',
+        expect(subject).to contain_concat__fragment('nftables-ip6-nat-footer').with(
+          target: 'nftables-ip6-nat',
           content: %r{^\}$},
-          order:   '99'
+          order: '99'
         )
       }
 
       context 'table ip nat chain prerouting' do
         it {
-          is_expected.to contain_concat('nftables-ip-nat-chain-PREROUTING').with(
-            path:           '/etc/nftables/puppet-preflight/ip-nat-chain-PREROUTING.nft',
-            owner:          'root',
-            group:          'root',
-            mode:           '0640',
+          expect(subject).to contain_concat('nftables-ip-nat-chain-PREROUTING').with(
+            path: '/etc/nftables/puppet-preflight/ip-nat-chain-PREROUTING.nft',
+            owner: 'root',
+            group: 'root',
+            mode: '0640',
             ensure_newline: true
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-header').with(
-            target:  'nftables-ip-nat-chain-PREROUTING',
+          expect(subject).to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-header').with(
+            target: 'nftables-ip-nat-chain-PREROUTING',
             content: %r{^chain PREROUTING \{$},
-            order:   '00'
+            order: '00'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-type').with(
-            target:  'nftables-ip-nat-chain-PREROUTING',
+          expect(subject).to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-type').with(
+            target: 'nftables-ip-nat-chain-PREROUTING',
             content: %r{^  type nat hook prerouting priority -100$},
-            order:   '01-nftables-ip-nat-chain-PREROUTING-rule-type-b'
+            order: '01-nftables-ip-nat-chain-PREROUTING-rule-type-b'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-policy').with(
-            target:  'nftables-ip-nat-chain-PREROUTING',
+          expect(subject).to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-policy').with(
+            target: 'nftables-ip-nat-chain-PREROUTING',
             content: %r{^  policy accept$},
-            order:   '02-nftables-ip-nat-chain-PREROUTING-rule-policy-b'
+            order: '02-nftables-ip-nat-chain-PREROUTING-rule-policy-b'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-footer').with(
-            target:  'nftables-ip-nat-chain-PREROUTING',
+          expect(subject).to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-footer').with(
+            target: 'nftables-ip-nat-chain-PREROUTING',
             content: %r{^\}$},
-            order:   '99'
+            order: '99'
           )
         }
       end
 
       context 'table ip nat chain postrouting' do
         it {
-          is_expected.to contain_concat('nftables-ip-nat-chain-POSTROUTING').with(
-            path:           '/etc/nftables/puppet-preflight/ip-nat-chain-POSTROUTING.nft',
-            owner:          'root',
-            group:          'root',
-            mode:           '0640',
+          expect(subject).to contain_concat('nftables-ip-nat-chain-POSTROUTING').with(
+            path: '/etc/nftables/puppet-preflight/ip-nat-chain-POSTROUTING.nft',
+            owner: 'root',
+            group: 'root',
+            mode: '0640',
             ensure_newline: true
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-header').with(
-            target:  'nftables-ip-nat-chain-POSTROUTING',
+          expect(subject).to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-header').with(
+            target: 'nftables-ip-nat-chain-POSTROUTING',
             content: %r{^chain POSTROUTING \{$},
-            order:   '00'
+            order: '00'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-type').with(
-            target:  'nftables-ip-nat-chain-POSTROUTING',
+          expect(subject).to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-type').with(
+            target: 'nftables-ip-nat-chain-POSTROUTING',
             content: %r{^  type nat hook postrouting priority 100$},
-            order:   '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b'
+            order: '01-nftables-ip-nat-chain-POSTROUTING-rule-type-b'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-policy').with(
-            target:  'nftables-ip-nat-chain-POSTROUTING',
+          expect(subject).to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-policy').with(
+            target: 'nftables-ip-nat-chain-POSTROUTING',
             content: %r{^  policy accept$},
-            order:   '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b'
+            order: '02-nftables-ip-nat-chain-POSTROUTING-rule-policy-b'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-footer').with(
-            target:  'nftables-ip-nat-chain-POSTROUTING',
+          expect(subject).to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-footer').with(
+            target: 'nftables-ip-nat-chain-POSTROUTING',
             content: %r{^\}$},
-            order:   '99'
+            order: '99'
           )
         }
       end
 
       context 'table ip6 nat chain prerouting' do
         it {
-          is_expected.to contain_concat('nftables-ip6-nat-chain-PREROUTING6').with(
-            path:           '/etc/nftables/puppet-preflight/ip6-nat-chain-PREROUTING6.nft',
-            owner:          'root',
-            group:          'root',
-            mode:           '0640',
+          expect(subject).to contain_concat('nftables-ip6-nat-chain-PREROUTING6').with(
+            path: '/etc/nftables/puppet-preflight/ip6-nat-chain-PREROUTING6.nft',
+            owner: 'root',
+            group: 'root',
+            mode: '0640',
             ensure_newline: true
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-header').with(
-            target:  'nftables-ip6-nat-chain-PREROUTING6',
+          expect(subject).to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-header').with(
+            target: 'nftables-ip6-nat-chain-PREROUTING6',
             content: %r{^chain PREROUTING6 \{$},
-            order:   '00'
+            order: '00'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-rule-type').with(
-            target:  'nftables-ip6-nat-chain-PREROUTING6',
+          expect(subject).to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-rule-type').with(
+            target: 'nftables-ip6-nat-chain-PREROUTING6',
             content: %r{^  type nat hook prerouting priority -100$},
-            order:   '01-nftables-ip6-nat-chain-PREROUTING6-rule-type-b'
+            order: '01-nftables-ip6-nat-chain-PREROUTING6-rule-type-b'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-rule-policy').with(
-            target:  'nftables-ip6-nat-chain-PREROUTING6',
+          expect(subject).to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-rule-policy').with(
+            target: 'nftables-ip6-nat-chain-PREROUTING6',
             content: %r{^  policy accept$},
-            order:   '02-nftables-ip6-nat-chain-PREROUTING6-rule-policy-b'
+            order: '02-nftables-ip6-nat-chain-PREROUTING6-rule-policy-b'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-footer').with(
-            target:  'nftables-ip6-nat-chain-PREROUTING6',
+          expect(subject).to contain_concat__fragment('nftables-ip6-nat-chain-PREROUTING6-footer').with(
+            target: 'nftables-ip6-nat-chain-PREROUTING6',
             content: %r{^\}$},
-            order:   '99'
+            order: '99'
           )
         }
       end
 
       context 'table ip nat chain postrouting' do
         it {
-          is_expected.to contain_concat('nftables-ip6-nat-chain-POSTROUTING6').with(
-            path:           '/etc/nftables/puppet-preflight/ip6-nat-chain-POSTROUTING6.nft',
-            owner:          'root',
-            group:          'root',
-            mode:           '0640',
+          expect(subject).to contain_concat('nftables-ip6-nat-chain-POSTROUTING6').with(
+            path: '/etc/nftables/puppet-preflight/ip6-nat-chain-POSTROUTING6.nft',
+            owner: 'root',
+            group: 'root',
+            mode: '0640',
             ensure_newline: true
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-header').with(
-            target:  'nftables-ip6-nat-chain-POSTROUTING6',
+          expect(subject).to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-header').with(
+            target: 'nftables-ip6-nat-chain-POSTROUTING6',
             content: %r{^chain POSTROUTING6 \{$},
-            order:   '00'
+            order: '00'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-rule-type').with(
-            target:  'nftables-ip6-nat-chain-POSTROUTING6',
+          expect(subject).to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-rule-type').with(
+            target: 'nftables-ip6-nat-chain-POSTROUTING6',
             content: %r{^  type nat hook postrouting priority 100$},
-            order:   '01-nftables-ip6-nat-chain-POSTROUTING6-rule-type-b'
+            order: '01-nftables-ip6-nat-chain-POSTROUTING6-rule-type-b'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-rule-policy').with(
-            target:  'nftables-ip6-nat-chain-POSTROUTING6',
+          expect(subject).to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-rule-policy').with(
+            target: 'nftables-ip6-nat-chain-POSTROUTING6',
             content: %r{^  policy accept$},
-            order:   '02-nftables-ip6-nat-chain-POSTROUTING6-rule-policy-b'
+            order: '02-nftables-ip6-nat-chain-POSTROUTING6-rule-policy-b'
           )
         }
+
         it {
-          is_expected.to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-footer').with(
-            target:  'nftables-ip6-nat-chain-POSTROUTING6',
+          expect(subject).to contain_concat__fragment('nftables-ip6-nat-chain-POSTROUTING6-footer').with(
+            target: 'nftables-ip6-nat-chain-POSTROUTING6',
             content: %r{^\}$},
-            order:   '99'
+            order: '99'
           )
         }
       end
@@ -245,13 +263,14 @@ describe 'nftables' do
         end
 
         it { is_expected.to compile }
+
         it {
-          is_expected.to contain_concat('nftables-ip-mycustomtablename').with(
-            path:   '/etc/nftables/puppet-preflight/ip-mycustomtablename.nft',
+          expect(subject).to contain_concat('nftables-ip-mycustomtablename').with(
+            path: '/etc/nftables/puppet-preflight/ip-mycustomtablename.nft',
             ensure: 'present',
-            owner:  'root',
-            group:  'root',
-            mode:   '0640'
+            owner: 'root',
+            group: 'root',
+            mode: '0640'
           )
         }
       end
