summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/provider/vcsrepo/p4.rb3
-rw-r--r--spec/unit/puppet/provider/vcsrepo/p4_spec.rb2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/provider/vcsrepo/p4.rb b/lib/puppet/provider/vcsrepo/p4.rb
index da9c953..4f53415 100644
--- a/lib/puppet/provider/vcsrepo/p4.rb
+++ b/lib/puppet/provider/vcsrepo/p4.rb
@@ -179,7 +179,8 @@ Puppet::Type.type(:vcsrepo).provide(:p4, :parent => Puppet::Provider::Vcsrepo) d
spec = String.new
view = "\nView:\n"
- hash.each do |k,v|
+ hash.keys.sort.each do |k|
+ v = hash[k]
next if( k == "code" )
if(k.to_s =~ /View/ )
view += "\t#{v}\n"
diff --git a/spec/unit/puppet/provider/vcsrepo/p4_spec.rb b/spec/unit/puppet/provider/vcsrepo/p4_spec.rb
index e45650a..1261915 100644
--- a/spec/unit/puppet/provider/vcsrepo/p4_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/p4_spec.rb
@@ -16,7 +16,7 @@ describe Puppet::Type.type(:vcsrepo).provider(:p4) do
end
spec = {
- :input => "Root: /tmp/vcsrepo\nDescription: Generated by Puppet VCSrepo\n\nView:\n",
+ :input => "Description: Generated by Puppet VCSrepo\nRoot: /tmp/vcsrepo\n\nView:\n",
:marshal => false
}