summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-11-22 10:00:55 +1100
committerJames Turnbull <james@lovedthanlost.net>2008-11-22 10:00:55 +1100
commit27a750d4884f2f48c05f5ab6a5c70c7cecf5ff04 (patch)
tree10ba902a26ae185385a8e65c5ca1ec28b52191c2
parenteb0d32a1548314713dc3a1360a4e9d44621afcfc (diff)
downloadpuppet-27a750d4884f2f48c05f5ab6a5c70c7cecf5ff04.tar.gz
puppet-27a750d4884f2f48c05f5ab6a5c70c7cecf5ff04.tar.xz
puppet-27a750d4884f2f48c05f5ab6a5c70c7cecf5ff04.zip
Revert "Fixing #1755 - File modes (and other strange properties) will now display correctly"
This reverts commit ed4c4050a8ac46c509b20031814646a49ba86e54.
-rw-r--r--lib/puppet/type.rb4
-rwxr-xr-xspec/unit/type.rb14
2 files changed, 2 insertions, 16 deletions
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
index 7a1c8b40b..7e8654921 100644
--- a/lib/puppet/type.rb
+++ b/lib/puppet/type.rb
@@ -2487,8 +2487,8 @@ class Type
trans = TransObject.new(self.title, self.class.name)
values = retrieve()
- values.each do |param, value|
- trans[param.name] = param.is_to_s(value)
+ values.each do |name, value|
+ trans[name.name] = value
end
@parameters.each do |name, param|
diff --git a/spec/unit/type.rb b/spec/unit/type.rb
index 903936abb..5e6cf3357 100755
--- a/spec/unit/type.rb
+++ b/spec/unit/type.rb
@@ -61,18 +61,4 @@ describe Puppet::Type do
@catalog.clear(true)
end
end
-
- describe "when converting to a transportable resource" do
- before do
- @user = Puppet::Type.type(:user).create(:name => "to_trans_testing", :ensure => :present)
- end
-
- it "should use each parameter's 'is_to_s' method to display the value" do
- # Use 'ensure' because none of the other props will be tested if the user is absent.
- @user.property(:ensure).expects(:retrieve).returns :absent
- @user.property(:ensure).expects(:is_to_s).with(:absent)
-
- @user.to_trans
- end
- end
end