diff options
author | Dan Bode <dan@puppetlabs.com> | 2012-08-13 18:53:47 -0700 |
---|---|---|
committer | Dan Bode <dan@puppetlabs.com> | 2012-08-13 18:53:47 -0700 |
commit | 5ffd33e8f1e50b717c9a4dae56230221f8ac97e6 (patch) | |
tree | 5bc9979558e1670ebe1c1543b6184def6033f11e /spec/functions | |
parent | 222a65dfe23e15561369474b8db939aebf07bca4 (diff) | |
download | puppet-stdlib-5ffd33e8f1e50b717c9a4dae56230221f8ac97e6.tar.gz puppet-stdlib-5ffd33e8f1e50b717c9a4dae56230221f8ac97e6.tar.bz2 |
re-formatting
This commit refactors to ensure 80 character lines.
Diffstat (limited to 'spec/functions')
-rw-r--r-- | spec/functions/defined_with_params_spec.rb | 13 | ||||
-rw-r--r-- | spec/functions/ensure_resource_spec.rb | 10 |
2 files changed, 16 insertions, 7 deletions
diff --git a/spec/functions/defined_with_params_spec.rb b/spec/functions/defined_with_params_spec.rb index f995b67..28dbab3 100644 --- a/spec/functions/defined_with_params_spec.rb +++ b/spec/functions/defined_with_params_spec.rb @@ -17,16 +17,21 @@ describe 'defined_with_params' do end end - describe 'when comparted against a resource with attributes' do + describe 'when compared against a resource with attributes' do let :pre_condition do 'user { "dan": ensure => present, shell => "/bin/csh", managehome => false}' end it do should run.with_params('User[dan]', {}).and_return(true) - should run.with_params('User[dan]', {'ensure' => 'present'}).and_return(true) - should run.with_params('User[dan]', {'ensure' => 'present', 'managehome' => false}).and_return(true) - should run.with_params('User[dan]', {'ensure' => 'absent', 'managehome' => false}).and_return(false) should run.with_params('User[dan]', '').and_return(true) + should run.with_params('User[dan]', {'ensure' => 'present'} + ).and_return(true) + should run.with_params('User[dan]', + {'ensure' => 'present', 'managehome' => false} + ).and_return(true) + should run.with_params('User[dan]', + {'ensure' => 'absent', 'managehome' => false} + ).and_return(false) end end end diff --git a/spec/functions/ensure_resource_spec.rb b/spec/functions/ensure_resource_spec.rb index e03efda..611666e 100644 --- a/spec/functions/ensure_resource_spec.rb +++ b/spec/functions/ensure_resource_spec.rb @@ -19,7 +19,7 @@ describe 'ensure_resource' do end end - describe 'when comparted against a resource with attributes' do + describe 'when compared against a resource with attributes' do let :pre_condition do 'user { "dan": ensure => present, shell => "/bin/csh", managehome => false}' end @@ -28,9 +28,13 @@ describe 'ensure_resource' do should run.with_params('User', 'dan', {}) should run.with_params('User', 'dan', '') should run.with_params('User', 'dan', {'ensure' => 'present'}) - should run.with_params('User', 'dan', {'ensure' => 'present', 'managehome' => false}) + should run.with_params('User', 'dan', + {'ensure' => 'present', 'managehome' => false} + ) # test that this fails - should run.with_params('User', 'dan', {'ensure' => 'absent', 'managehome' => false}).and_raise_error(Puppet::Error) + should run.with_params('User', 'dan', + {'ensure' => 'absent', 'managehome' => false} + ).and_raise_error(Puppet::Error) end end end |