summaryrefslogtreecommitdiff
path: root/spec/mixlib/log/formatter_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-21 11:07:50 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-21 11:07:50 -0700
commit91e24db8ad73ab332c6491ae314c70f181d3dbf1 (patch)
tree1facea47ada18be9bddfb74dbb169c8815198ec5 /spec/mixlib/log/formatter_spec.rb
parent244c1d477bacdfc1a61ebda418bf70b88c17f2e1 (diff)
downloadmixlib-log-91e24db8ad73ab332c6491ae314c70f181d3dbf1.tar.gz
Optimize our requires
Avoid requiring things that are already defined. Rubygems is very slow at traversing the filesystem. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/mixlib/log/formatter_spec.rb')
-rw-r--r--spec/mixlib/log/formatter_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/mixlib/log/formatter_spec.rb b/spec/mixlib/log/formatter_spec.rb
index 16e45af..491bb10 100644
--- a/spec/mixlib/log/formatter_spec.rb
+++ b/spec/mixlib/log/formatter_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require "time"
+require "time" unless defined?(Time)
require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper"))
RSpec.describe Mixlib::Log::Formatter do