diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2011-08-15 11:25:37 -0700 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2011-08-15 11:25:37 -0700 |
| commit | 39116d4a6ed4861e46b16ba26c679a8b346fca00 (patch) | |
| tree | 0e7428a65f3d3f72a29227f2e391f905185df720 | |
| parent | e7d5c7c1cd4109d7bb061a503f5da8777a1be66d (diff) | |
| download | puppet-39116d4a6ed4861e46b16ba26c679a8b346fca00.tar.gz puppet-39116d4a6ed4861e46b16ba26c679a8b346fca00.tar.xz puppet-39116d4a6ed4861e46b16ba26c679a8b346fca00.zip | |
maint: Fix order dependent spec failure
Since the cacher was removed in master the indirection's terminus class
no longer gets reset between tests by clearing the cache. This meant
that one spec was setting the cache_class and affecting another spec,
causing failures.
Now that test manually resets its indirection related info.
Reviewed-by: Nick Lewis <nick@puppetlabs.com>
| -rwxr-xr-x | spec/unit/application/apply_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/application/apply_spec.rb b/spec/unit/application/apply_spec.rb index 489f4db36..f3ad893d3 100755 --- a/spec/unit/application/apply_spec.rb +++ b/spec/unit/application/apply_spec.rb @@ -158,6 +158,11 @@ describe Puppet::Application::Apply do Puppet::Configurer.any_instance.stubs(:save_last_run_summary) # to prevent it from trying to write files end + after :each do + Puppet::Node::Facts.indirection.reset_terminus_class + Puppet::Node::Facts.indirection.cache_class = nil + end + it "should set the code to run from --code" do @apply.options[:code] = "code to run" Puppet.expects(:[]=).with(:code,"code to run") |
