spec/unit/util/storage_spec.rb in puppet-3.3.2 vs spec/unit/util/storage_spec.rb in puppet-3.4.0.rc1
- old
+ new
@@ -75,19 +75,19 @@
before(:each) do
@path = tmpfile('storage_test')
end
it "should not fail to load" do
- FileTest.exists?(@path).should be_false
+ Puppet::FileSystem::File.exist?(@path).should be_false
Puppet[:statedir] = @path
Puppet::Util::Storage.load
Puppet[:statefile] = @path
Puppet::Util::Storage.load
end
it "should not lose its internal state when load() is called" do
- FileTest.exists?(@path).should be_false
+ Puppet::FileSystem::File.exist?(@path).should be_false
Puppet::Util::Storage.cache(:yayness)
Puppet::Util::Storage.state.should == {:yayness=>{}}
Puppet[:statefile] = @path
@@ -174,15 +174,15 @@
@saved_statefile = Puppet[:statefile]
Puppet[:statefile] = @state_file
end
it "should create the state file if it does not exist" do
- FileTest.exists?(Puppet[:statefile]).should be_false
+ Puppet::FileSystem::File.exist?(Puppet[:statefile]).should be_false
Puppet::Util::Storage.cache(:yayness)
Puppet::Util::Storage.store
- FileTest.exists?(Puppet[:statefile]).should be_true
+ Puppet::FileSystem::File.exist?(Puppet[:statefile]).should be_true
end
it "should raise an exception if the state file is not a regular file" do
Dir.mkdir(Puppet[:statefile])
Puppet::Util::Storage.cache(:yayness)