summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/mixlib/authentication/http_authentication_request_spec.rb2
-rw-r--r--spec/mixlib/authentication/mixlib_authentication_spec.rb4
-rw-r--r--spec/spec_helper.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/spec/mixlib/authentication/http_authentication_request_spec.rb b/spec/mixlib/authentication/http_authentication_request_spec.rb
index 29a134a..b74968b 100644
--- a/spec/mixlib/authentication/http_authentication_request_spec.rb
+++ b/spec/mixlib/authentication/http_authentication_request_spec.rb
@@ -16,7 +16,7 @@
# 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 "mixlib/authentication"
require "mixlib/authentication/http_authentication_request"
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.
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index f10ee93..015c298 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -17,6 +17,6 @@
# limitations under the License.
#
-$:.unshift File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")) # lib in mixlib-authentication
+$:.unshift File.expand_path(File.join(__dir__, "..", "lib")) # lib in mixlib-authentication
require "rubygems" unless defined?(Gem)