Skip to content

Commit

Permalink
(maint) Fix yumrepo inifile spec to stub the correct method
Browse files Browse the repository at this point in the history
The spec stubs File::exist? which does not take into account the various
implementations in Puppet::FileSystem.  The spec should instead stub
Puppet::FileSystem::exist so that it behaves consistently on all
platforms.
  • Loading branch information
Peter Huene committed Feb 14, 2014
1 parent 3f54fe8 commit a76d681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/unit/provider/yumrepo/inifile_spec.rb
Expand Up @@ -30,7 +30,7 @@
before :each do
described_class.stubs(:reposdir).returns(['/etc/yum.repos.d'])
File.expects(:file?).with('/etc/yum.repos.d/test.repo').returns(true)
File.expects(:exist?).with(Pathname.new('/etc/yum.repos.d/test.repo')).returns(true)
Puppet::FileSystem.expects(:exist?).with('/etc/yum.repos.d/test.repo').returns(true)
File.expects(:read).with('/etc/yum.repos.d/test.repo').returns(repo_file)
end

Expand Down

0 comments on commit a76d681

Please sign in to comment.