diff options
author | Rick Bradley <rick@rickbradley.com> | 2011-03-06 21:38:49 -0600 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2011-03-07 19:39:08 +1100 |
commit | 2e06cdcc820ad045f345579901d3d9f04530e0c6 (patch) | |
tree | f5eb1a85424b760eded7a695c1ceb1418cbb9705 | |
parent | 7db4e2d5bb59af9df53ea0593ef126ea3a3ccf52 (diff) | |
download | facter-2e06cdcc820ad045f345579901d3d9f04530e0c6.tar.gz facter-2e06cdcc820ad045f345579901d3d9f04530e0c6.tar.xz facter-2e06cdcc820ad045f345579901d3d9f04530e0c6.zip |
(#6615) fix missing stub calls in loader specs
It's not clear to me how these are now needed and apparently
weren't when we first checked this in. These stubs will let the
specs continue on so we can check the load order, which was the
original intent of (#5510) which caused the introduction of these
specs.
Signed-off-by: Rick Bradley <rick@rickbradley.com>
-rwxr-xr-x | spec/unit/util/loader_spec.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/spec/unit/util/loader_spec.rb b/spec/unit/util/loader_spec.rb index eed533a..90530e8 100755 --- a/spec/unit/util/loader_spec.rb +++ b/spec/unit/util/loader_spec.rb @@ -119,7 +119,10 @@ describe Facter::Util::Loader do @loader.stubs(:search_path).returns %w{/one/dir} Dir.stubs(:entries).with("/one/dir/testing").returns %w{foo.rb bar.rb} - %w{/one/dir/testing/foo.rb /one/dir/testing/bar.rb}.each { |f| File.stubs(:directory?).with(f).returns false } + %w{/one/dir/testing/foo.rb /one/dir/testing/bar.rb}.each do |f| + File.stubs(:directory?).with(f).returns false + Kernel.stubs(:load).with(f) + end @loader.load(:testing) @loader.loaded_files.should == %w{/one/dir/testing/bar.rb /one/dir/testing/foo.rb} @@ -202,7 +205,11 @@ describe Facter::Util::Loader do Dir.stubs(:entries).with("/one/dir").returns %w{foo.rb bar.rb} %w{/one/dir}.each { |f| File.stubs(:directory?).with(f).returns true } - %w{/one/dir/foo.rb /one/dir/bar.rb}.each { |f| File.stubs(:directory?).with(f).returns false } + + %w{/one/dir/foo.rb /one/dir/bar.rb}.each do |f| + File.stubs(:directory?).with(f).returns false + Kernel.expects(:load).with(f) + end @loader.load_all |