Sha256: 14c351cbaa6b8ef31b3b10fff9d5118be024ce72fd590207bb0ec41881af7798
Contents?: true
Size: 779 Bytes
Versions: 3
Compression:
Stored size: 779 Bytes
Contents
#!/usr/bin/env ruby Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") } property = Puppet::Type.type(:file).attrclass(:ensure) describe property do before do @resource = stub 'resource', :line => "foo", :file => "bar", :replace? => true @resource.stubs(:[]).returns "foo" @resource.stubs(:[]).with(:path).returns "/my/file" @ensure = property.new :resource => @resource end describe "when testing whether in sync" do it "should always be in sync if replace is 'false' unless the file is missing" do @resource.expects(:replace?).returns false @ensure.insync?(:link).should be_true end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.24.9 | spec/unit/type/file/ensure.rb |
puppet-0.24.7 | spec/unit/type/file/ensure.rb |
puppet-0.24.8 | spec/unit/type/file/ensure.rb |