From 4c1219083ba233f895fd99e5d3a3a363d489b727 Mon Sep 17 00:00:00 2001 From: Daniele Sluijters Date: Fri, 5 Feb 2016 13:48:19 +0100 Subject: spec: use :parameter instead of 'option' --- spec/classes/unattended_upgrades_spec.rb | 84 ++++++++++++++++---------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/spec/classes/unattended_upgrades_spec.rb b/spec/classes/unattended_upgrades_spec.rb index a630648..d91ef61 100644 --- a/spec/classes/unattended_upgrades_spec.rb +++ b/spec/classes/unattended_upgrades_spec.rb @@ -18,21 +18,21 @@ describe 'unattended_upgrades' do it { should contain_apt__conf('unattended-upgrades').with( - 'require' => 'Package[unattended-upgrades]', + :require => 'Package[unattended-upgrades]', ) } it { should contain_apt__conf('periodic').with( - 'require' => 'Package[unattended-upgrades]', + :require => 'Package[unattended-upgrades]', ) } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( /Unattended-Upgrade::Origins-Pattern {/ ).with_content( @@ -58,9 +58,9 @@ describe 'unattended_upgrades' do it { should create_file(file_periodic).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( /APT::Periodic::Enable "1";/ ).with_content( @@ -89,7 +89,7 @@ describe 'unattended_upgrades' do } it { should contain_apt__conf('auto-upgrades').with( - 'ensure' => 'absent', + :ensure => 'absent', ) } end @@ -103,9 +103,9 @@ describe 'unattended_upgrades' do } } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( # This section varies for different releases /\Unattended-Upgrade::Allowed-Origins\ {\n @@ -126,9 +126,9 @@ describe 'unattended_upgrades' do } } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( # This section varies for different releases /\Unattended-Upgrade::Origins-Pattern\ {\n @@ -148,9 +148,9 @@ describe 'unattended_upgrades' do } } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( # This section varies for different releases /\Unattended-Upgrade::Origins-Pattern\ {\n @@ -169,9 +169,9 @@ describe 'unattended_upgrades' do } } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( # This is the only section that's different for Ubuntu compared to Debian /\Unattended-Upgrade::Allowed-Origins\ {\n @@ -190,9 +190,9 @@ describe 'unattended_upgrades' do } } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( # This is the only section that's different for Ubuntu compared to Debian /\Unattended-Upgrade::Allowed-Origins\ {\n @@ -211,9 +211,9 @@ describe 'unattended_upgrades' do } } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( # This is the only section that's different for Ubuntu compared to Debian /\Unattended-Upgrade::Allowed-Origins\ {\n @@ -232,9 +232,9 @@ describe 'unattended_upgrades' do } } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( # This is the only section that's different for Ubuntu compared to Debian /\Unattended-Upgrade::Allowed-Origins\ {\n @@ -253,9 +253,9 @@ describe 'unattended_upgrades' do } } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ) } end @@ -294,20 +294,20 @@ describe 'unattended_upgrades' do it { should contain_package('unattended-upgrades') } it { should contain_apt__conf('unattended-upgrades').with( - 'require' => 'Package[unattended-upgrades]', + :require => 'Package[unattended-upgrades]', ) } it { should contain_apt__conf('periodic').with( - 'require' => 'Package[unattended-upgrades]', + :require => 'Package[unattended-upgrades]', ) } it { should create_file(file_unattended).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( /Unattended-Upgrade::Allowed-Origins {\n\t"bananas";\n};/ ).with_content( @@ -333,9 +333,9 @@ describe 'unattended_upgrades' do it { should create_file(file_periodic).with( - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0644', + :owner => 'root', + :group => 'root', + :mode => '0644', ).with_content( /APT::Periodic::Enable "1";/ ).with_content( @@ -367,7 +367,7 @@ describe 'unattended_upgrades' do it { should contain_apt__conf('auto-upgrades').with( - 'ensure' => 'absent', + :ensure => 'absent', ) } end -- cgit v1.2.3