commit 01d8a819a56fcaf14e4b7b73774a6ed4dc30635a
Author: tr <tr@immerda.ch>
Date:   Fri Oct 16 16:29:55 2020 +0200

    Styling to make tests green

diff --git a/spec/classes/ip_nat_spec.rb b/spec/classes/ip_nat_spec.rb
index b672043..45e1ead 100644
--- a/spec/classes/ip_nat_spec.rb
+++ b/spec/classes/ip_nat_spec.rb
@@ -9,71 +9,93 @@ describe 'nftables' do
 
       it { is_expected.to compile }
 
-      it { is_expected.to contain_file('/etc/nftables/puppet/ip-nat.nft').with(
-        :ensure => 'file',
-        :owner  => 'root',
-        :group  => 'root',
-        :mode   => '0640',
-      )}
+      it {
+        is_expected.to contain_file('/etc/nftables/puppet/ip-nat.nft').with(
+          ensure: 'file',
+          owner:  'root',
+          group:  'root',
+          mode:   '0640',
+        )
+      }
 
       context 'chain prerouting' do
-        it { is_expected.to contain_concat('nftables-ip-nat-chain-PREROUTING').with(
-          :path           => '/etc/nftables/puppet/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',
-          :content => /^chain PREROUTING {$/,
-          :order   => '00',
-        )}
-        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-type').with(
-          :target  => 'nftables-ip-nat-chain-PREROUTING',
-          :content => /^  type nat hook prerouting priority -100$/,
-          :order   => '01',
-        )}
-        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-policy').with(
-          :target  => 'nftables-ip-nat-chain-PREROUTING',
-          :content => /^  policy accept$/,
-          :order   => '02',
-        )}
-        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-footer').with(
-          :target  => 'nftables-ip-nat-chain-PREROUTING',
-          :content => /^}$/,
-          :order   => '99',
-        )}
+        it {
+          is_expected.to contain_concat('nftables-ip-nat-chain-PREROUTING').with(
+            path:           '/etc/nftables/puppet/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',
+            content: %r{^chain PREROUTING \{$},
+            order:   '00',
+          )
+        }
+        it {
+          is_expected.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',
+          )
+        }
+        it {
+          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-rule-policy').with(
+            target:  'nftables-ip-nat-chain-PREROUTING',
+            content: %r{^  policy accept$},
+            order:   '02',
+          )
+        }
+        it {
+          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-PREROUTING-footer').with(
+            target:  'nftables-ip-nat-chain-PREROUTING',
+            content: %r{^\}$},
+            order:   '99',
+          )
+        }
       end
 
       context 'chain output' do
-        it { is_expected.to contain_concat('nftables-ip-nat-chain-POSTROUTING').with(
-          :path           => '/etc/nftables/puppet/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',
-          :content => /^chain POSTROUTING {$/,
-          :order   => '00',
-        )}
-        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-type').with(
-          :target  => 'nftables-ip-nat-chain-POSTROUTING',
-          :content => /^  type nat hook postrouting priority 100$/,
-          :order   => '01',
-        )}
-        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-policy').with(
-          :target  => 'nftables-ip-nat-chain-POSTROUTING',
-          :content => /^  policy accept$/,
-          :order   => '02',
-        )}
-        it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-footer').with(
-          :target  => 'nftables-ip-nat-chain-POSTROUTING',
-          :content => /^}$/,
-          :order   => '99',
-        )}
+        it {
+          is_expected.to contain_concat('nftables-ip-nat-chain-POSTROUTING').with(
+            path:           '/etc/nftables/puppet/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',
+            content: %r{^chain POSTROUTING \{$},
+            order:   '00',
+          )
+        }
+        it {
+          is_expected.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',
+          )
+        }
+        it {
+          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-policy').with(
+            target:  'nftables-ip-nat-chain-POSTROUTING',
+            content: %r{^  policy accept$},
+            order:   '02',
+          )
+        }
+        it {
+          is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-footer').with(
+            target:  'nftables-ip-nat-chain-POSTROUTING',
+            content: %r{^\}$},
+            order:   '99',
+          )
+        }
       end
     end
   end
