diff options
author | Nigel Kersten <nigelk@google.com> | 2009-07-30 10:15:46 -0700 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-08-01 10:56:17 +1000 |
commit | 21f477a57c2e1dc1ce4b47ea6ee37f8eef46e40c (patch) | |
tree | 29b67a5454e01bd6efa0038d1fc113fa98d94005 | |
parent | 2e41edbd235ddf8278073fd645821f48523a0af3 (diff) | |
download | puppet-21f477a57c2e1dc1ce4b47ea6ee37f8eef46e40c.tar.gz puppet-21f477a57c2e1dc1ce4b47ea6ee37f8eef46e40c.tar.xz puppet-21f477a57c2e1dc1ce4b47ea6ee37f8eef46e40c.zip |
Fixes #2472. Load Facter facts when ralsh is invoked, plus test.
-rw-r--r-- | lib/puppet/application/ralsh.rb | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | spec/unit/application/ralsh.rb | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/puppet/application/ralsh.rb b/lib/puppet/application/ralsh.rb index 8d8d306b8..6ad520dca 100644 --- a/lib/puppet/application/ralsh.rb +++ b/lib/puppet/application/ralsh.rb @@ -1,5 +1,6 @@ require 'puppet' require 'puppet/application' +require 'facter' Puppet::Application.new(:ralsh) do @@ -10,6 +11,7 @@ Puppet::Application.new(:ralsh) do preinit do @extra_params = [] @host = nil + Facter.loadfacts end option("--debug","-d") diff --git a/spec/unit/application/ralsh.rb b/spec/unit/application/ralsh.rb index 4372dac37..dbc196cdf 100644..100755 --- a/spec/unit/application/ralsh.rb +++ b/spec/unit/application/ralsh.rb @@ -47,6 +47,11 @@ describe "ralsh" do @ralsh.extra_params.should == [] end + + it "should load Facter facts" do + Facter.expects(:loadfacts).once + @ralsh.run_preinit + end end describe "when handling options" do |