Browse files

(#12392) Don't require eventlog gem on non-Windows platforms

Commit `8d2ff89` attempted to require the windows eventlog gem within a
`:if => Puppet.features.microsoft_windows?` describe block, but I forgot
that requires within the block are still evaluated on non-Windows
platform, although the tests themselves won't be run.

This commit just conditionally requires the gem.
  • Loading branch information...
1 parent dce623c commit 100f42c2e7cd6b25b3d1f44386214f98559cf591 @joshcooper committed Apr 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 spec/unit/util/log_spec.rb
View
2 spec/unit/util/log_spec.rb
@@ -82,7 +82,7 @@
end
describe Puppet::Util::Log::DestEventlog, :if => Puppet.features.microsoft_windows? do
- require 'win32/eventlog'
+ require 'win32/eventlog' if Puppet.features.microsoft_windows?
before :each do
Win32::EventLog.stubs(:open).returns(mock 'mylog')

0 comments on commit 100f42c

Please sign in to comment.