Skip to content

Commit

Permalink
Fix specs finally
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Hain <[email protected]>
  • Loading branch information
scotthain committed Dec 7, 2017
1 parent 475c3b7 commit 7a7a833
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions spec/recipes/home_dir_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7a7a833

Please sign in to comment.