diff --git a/spec/classes/client_spec.rb b/spec/classes/client_spec.rb index f1d65a5..039267a 100644 --- a/spec/classes/client_spec.rb +++ b/spec/classes/client_spec.rb @@ -1,11 +1,9 @@ require 'spec_helper' describe 'vnc::client' do - on_supported_os.each do |os, facts| + on_supported_os.each do |os, os_facts| context "on #{os}" do - let(:facts) do - facts - end + let(:facts) { os_facts } it { is_expected.to compile.with_all_deps } it { is_expected.to create_class('vnc::client') } diff --git a/spec/classes/server_spec.rb b/spec/classes/server_spec.rb index 6bb8253..df6f037 100644 --- a/spec/classes/server_spec.rb +++ b/spec/classes/server_spec.rb @@ -1,11 +1,9 @@ require 'spec_helper' describe 'vnc::server' do - on_supported_os.each do |os, facts| + on_supported_os.each do |os, os_facts| context "on #{os}" do - let(:facts) do - facts - end + let(:facts) { os_facts } it { is_expected.to compile.with_all_deps } it { is_expected.to create_class('vnc::server') } @@ -14,25 +12,28 @@ it { is_expected.to contain_class('gdm') } it do - is_expected.to create_vnc__server__create('vnc_standard').with({ - 'port' => 5901, - 'geometry' => '1024x768', - 'depth' => 16 - }) + is_expected.to create_vnc__server__create('vnc_standard') + .with( + 'port' => 5901, + 'geometry' => '1024x768', + 'depth' => 16, + ) end it do - is_expected.to create_vnc__server__create('vnc_lowres').with({ - 'port' => 5902, - 'geometry' => '800x600', - 'depth' => 16 - }) + is_expected.to create_vnc__server__create('vnc_lowres') + .with( + 'port' => 5902, + 'geometry' => '800x600', + 'depth' => 16, + ) end it do - is_expected.to create_vnc__server__create('vnc_highres').with({ - 'port' => 5903, - 'geometry' => '1280x1024', - 'depth' => 16 - }) + is_expected.to create_vnc__server__create('vnc_highres') + .with( + 'port' => 5903, + 'geometry' => '1280x1024', + 'depth' => 16, + ) end it { is_expected.to contain_package('tigervnc-server') } diff --git a/spec/defines/server_create_spec.rb b/spec/defines/server_create_spec.rb index a7de2e4..a760ef0 100644 --- a/spec/defines/server_create_spec.rb +++ b/spec/defines/server_create_spec.rb @@ -2,11 +2,9 @@ describe 'vnc::server::create' do context 'supported operating systems' do - on_supported_os.each do |os, facts| + on_supported_os.each do |os, os_facts| context "on #{os}" do - let(:facts) do - facts - end + let(:facts) { os_facts } let(:title) { 'awesome_vnc' } @@ -17,21 +15,22 @@ it { is_expected.to contain_class('xinetd') } it do - is_expected.to contain_xinetd__service('awesome_vnc').with({ - 'banner' => '/dev/null', - 'flags' => ['REUSE', 'IPv4'], - 'protocol' => 'tcp', - 'socket_type' => 'stream', - 'x_wait' => 'no', - 'x_type' => 'UNLISTED', - 'log_on_success' => ['HOST', 'PID', 'DURATION'], - 'user' => 'nobody', - 'server' => '/usr/bin/Xvnc', - 'server_args' => '-inetd -localhost -audit 4 -s 15 -query localhost -NeverShared -once -SecurityTypes None -desktop awesome_vnc -geometry 1280x1024 -depth 16', - 'disable' => 'no', - 'trusted_nets' => ['127.0.0.1'], - 'port' => 5900 - }) + is_expected.to contain_xinetd__service('awesome_vnc') + .with( + 'banner' => '/dev/null', + 'flags' => ['REUSE', 'IPv4'], + 'protocol' => 'tcp', + 'socket_type' => 'stream', + 'x_wait' => 'no', + 'x_type' => 'UNLISTED', + 'log_on_success' => ['HOST', 'PID', 'DURATION'], + 'user' => 'nobody', + 'server' => '/usr/bin/Xvnc', + 'server_args' => '-inetd -localhost -audit 4 -s 15 -query localhost -NeverShared -once -SecurityTypes None -desktop awesome_vnc -geometry 1280x1024 -depth 16', + 'disable' => 'no', + 'trusted_nets' => ['127.0.0.1'], + 'port' => 5900, + ) end end end