summaryrefslogtreecommitdiff
path: root/spec/mixlib/authentication/mixlib_authentication_spec.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-09-08 23:35:38 -0700
committerTim Smith <tsmith84@gmail.com>2020-09-08 23:35:38 -0700
commit607d247c9a4bcef57a905e82454d5cd10bea5e7e (patch)
tree0854bee0f5dbe75caad74f67b1778d602e9bfad9 /spec/mixlib/authentication/mixlib_authentication_spec.rb
parent0fd5b792f8f7eaf38bb5308ff015e59513242c61 (diff)
downloadmixlib-authentication-607d247c9a4bcef57a905e82454d5cd10bea5e7e.tar.gz
Replace __FILE__ with __dir__ and use safe operatorschefstyle
A few new chefstyle rules to improve readability here. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/mixlib/authentication/mixlib_authentication_spec.rb')
-rw-r--r--spec/mixlib/authentication/mixlib_authentication_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/mixlib/authentication/mixlib_authentication_spec.rb b/spec/mixlib/authentication/mixlib_authentication_spec.rb
index b679208..3a6e0eb 100644
--- a/spec/mixlib/authentication/mixlib_authentication_spec.rb
+++ b/spec/mixlib/authentication/mixlib_authentication_spec.rb
@@ -19,13 +19,13 @@
# limitations under the License.
#
-require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper"))
+require File.expand_path(File.join(__dir__, "..", "..", "spec_helper"))
require "rubygems" unless defined?(Gem)
require "ostruct" unless defined?(OpenStruct)
require "openssl" unless defined?(OpenSSL)
require "mixlib/authentication/signatureverification"
-require "time" unless defined?(Time)
+require "time" unless defined?(Time.zone_offset)
require "net/ssh" unless defined?(Net::SSH)
# TODO: should make these regular spec-based mock objects.