diff options
author | Luke Kanies <luke@madstop.com> | 2009-02-19 12:57:29 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-02-19 17:51:21 -0600 |
commit | b800bde30bd5a08f5e222725588062e2bca37a79 (patch) | |
tree | 5d56ddb761a7892e883b7be62b1d3eeb5ca3fced /spec/unit/application.rb | |
parent | d7864bedafcca07806f6da3e3f472dc80d3206b7 (diff) | |
download | puppet-b800bde30bd5a08f5e222725588062e2bca37a79.tar.gz puppet-b800bde30bd5a08f5e222725588062e2bca37a79.tar.xz puppet-b800bde30bd5a08f5e222725588062e2bca37a79.zip |
Refactoring how the Settings file is parsed
The goal of this refactor was to use a cached attribute
for the LoadedFile instance we use to monitor whether
the file needs reparsing. We were getting tests that
affected later tests because they were holding on to
LoadedFile stubs, somehow.
The other main change here is that the Settings#parse
method now knows how to look up its own file path.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/application.rb')
-rwxr-xr-x | spec/unit/application.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/application.rb b/spec/unit/application.rb index e1f9362c4..5c3df0999 100755 --- a/spec/unit/application.rb +++ b/spec/unit/application.rb @@ -223,7 +223,7 @@ describe Puppet::Application do @app.stubs(:run_command) @app.should_parse_config - Puppet.expects(:parse_config) + Puppet.settings.expects(:parse) @app.run end @@ -232,7 +232,7 @@ describe Puppet::Application do @app.stubs(:run_command) @app.should_not_parse_config - Puppet.expects(:parse_config).never + Puppet.settings.expects(:parse).never @app.run end @@ -241,7 +241,7 @@ describe Puppet::Application do @app.stubs(:run_command) @app.stubs(:should_parse_config?).returns(true) - Puppet.expects(:parse_config) + Puppet.settings.expects(:parse) @app.run end |