Skip to content

Commit

Permalink
convert mocha to rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed May 18, 2019
1 parent 4897363 commit 3acf146
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/unit/puppet/provider/posixacl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
end
it 'encodes spaces in group names' do
RSpec::Mocks.with_temporary_scope do
Puppet::Type.stubs(:getfacl).returns("group:test group:rwx\n")
File.stubs(:exist?).returns(true)
#Puppet::Type.stubs(:getfacl).returns("group:test group:rwx\n")
allow(Puppet::Type).to receive(:getfacl).and_return("group:test group:rwx\n")
#File.stubs(:exist?).returns(true)
allow(File).to receive(:exist?).and_return(true)
expect do
provider_class.command :permission
end == ['group:test\040group:rwx']
Expand Down

0 comments on commit 3acf146

Please sign in to comment.