diff --git a/manifests/server.pp b/manifests/server.pp index ed9e1b3..e9b787a 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -11,7 +11,7 @@ $group = $selenium::params::group, $install_path = $selenium::params::install_path, ) inherits selenium::params { - validate_string($user) + validate_string($user) validate_string($group) validate_string($install_path) diff --git a/spec/classes/selenium_install_spec.rb b/spec/classes/selenium_install_spec.rb index 09d9afd..c323a3b 100644 --- a/spec/classes/selenium_install_spec.rb +++ b/spec/classes/selenium_install_spec.rb @@ -4,30 +4,36 @@ let(:title) { 'redhat' } let(:facts) {{ :osfamily=> 'RedHat' }} - it do - should include_class('wget') - should contain_class('selenium::install').with_version('2.35.0') - should contain_file('/opt/selenium').with({ - 'ensure' => 'directory', - 'owner' => 'selenium', - 'group' => 'selenium', - }) - should contain_file('/opt/selenium/jars').with({ - 'ensure' => 'directory', - 'owner' => 'selenium', - 'group' => 'selenium', - }) - should contain_file('/opt/selenium/log').with({ - 'ensure' => 'directory', - 'owner' => 'selenium', - 'group' => 'selenium', - }) - should contain_file('/var/log/selenium').with({ - 'ensure' => 'link', - 'owner' => 'root', - 'group' => 'root', - }) - should contain_wget__fetch('selenium-server-standalone') + context 'no params' do + let :pre_condition do + 'include selenium::server' + end + + it do + should include_class('wget') + should contain_class('selenium::install').with_version('2.35.0') + should contain_file('/opt/selenium').with({ + 'ensure' => 'directory', + 'owner' => 'selenium', + 'group' => 'selenium', + }) + should contain_file('/opt/selenium/jars').with({ + 'ensure' => 'directory', + 'owner' => 'selenium', + 'group' => 'selenium', + }) + should contain_file('/opt/selenium/log').with({ + 'ensure' => 'directory', + 'owner' => 'selenium', + 'group' => 'selenium', + }) + should contain_file('/var/log/selenium').with({ + 'ensure' => 'link', + 'owner' => 'root', + 'group' => 'root', + }) + should contain_wget__fetch('selenium-server-standalone') + end end end