From 7a7a83371b8832ba2829433eb0eb6ff8c7188c79 Mon Sep 17 00:00:00 2001 From: Scott Hain Date: Thu, 7 Dec 2017 12:17:15 -0800 Subject: [PATCH] Fix specs finally Signed-off-by: Scott Hain --- spec/recipes/home_dir_spec.rb | 7 ++++--- spec/spec_helper.rb | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/recipes/home_dir_spec.rb b/spec/recipes/home_dir_spec.rb index c235c02f..d5da8aef 100644 --- a/spec/recipes/home_dir_spec.rb +++ b/spec/recipes/home_dir_spec.rb @@ -15,7 +15,8 @@ allow(Mixlib::ShellOut).to receive(:new).with('stat -f -L -c %T /home/user_with_nfs_home_first 2>&1').and_return(stat_nfs) allow(Mixlib::ShellOut).to receive(:new).with('stat -f -L -c %T /home/user_with_nfs_home_second 2>&1').and_return(stat_nfs) - allow(File).to receive(:exist?).with('/usr/bin/bash').and_return(false, true) + allow(File).to receive(:exist?).and_call_original + allow(File).to receive(:exist?).with('/usr/bin/bash').and_return(true) end cached(:chef_run) do @@ -62,12 +63,12 @@ it 'not supports managing /dev/null home dir' do expect(chef_run).to create_user('user_with_dev_null_home') - .with_supports(manage_home: false) + .with(manage_home: false) end it 'supports managing local home dir' do expect(chef_run).to create_user('user_with_local_home') - .with_supports(manage_home: true) + .with(manage_home: true) end it 'not tries to manage .ssh dir for user "user_with_dev_null_home"' do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9797a168..773d5579 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,5 +4,5 @@ RSpec.configure do |config| config.color = true # Use color in STDOUT config.formatter = :documentation # Use the specified formatter - config.log_level = :info # Avoid deprecation notice SPAM + config.log_level = :error # Avoid deprecation notice SPAM end