summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-08-21 12:18:12 -0700
committerGitHub <noreply@github.com>2020-08-21 12:18:12 -0700
commit08ce9e5c47af33114454b3d422575990d15d2a05 (patch)
tree6c0660ce5a4037e78d74100be7f086211201cefd /spec
parentd3e3be2979fe9036cd478857952281540afa36f2 (diff)
parente5cb3198c6ee34032625d8eef16e0710c5c89ed0 (diff)
downloadmixlib-authentication-08ce9e5c47af33114454b3d422575990d15d2a05.tar.gz
Merge pull request #53 from chef/requires
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec')
-rw-r--r--spec/mixlib/authentication/http_authentication_request_spec.rb4
-rw-r--r--spec/mixlib/authentication/mixlib_authentication_spec.rb10
-rw-r--r--spec/spec_helper.rb2
3 files changed, 8 insertions, 8 deletions
diff --git a/spec/mixlib/authentication/http_authentication_request_spec.rb b/spec/mixlib/authentication/http_authentication_request_spec.rb
index bd265bb..29a134a 100644
--- a/spec/mixlib/authentication/http_authentication_request_spec.rb
+++ b/spec/mixlib/authentication/http_authentication_request_spec.rb
@@ -20,8 +20,8 @@ require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_hel
require "mixlib/authentication"
require "mixlib/authentication/http_authentication_request"
-require "ostruct"
-require "pp"
+require "ostruct" unless defined?(OpenStruct)
+require "pp" unless defined?(PP)
describe Mixlib::Authentication::HTTPAuthenticationRequest do
before do
diff --git a/spec/mixlib/authentication/mixlib_authentication_spec.rb b/spec/mixlib/authentication/mixlib_authentication_spec.rb
index 5a17d5c..b679208 100644
--- a/spec/mixlib/authentication/mixlib_authentication_spec.rb
+++ b/spec/mixlib/authentication/mixlib_authentication_spec.rb
@@ -20,13 +20,13 @@
#
require File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "spec_helper"))
-require "rubygems"
+require "rubygems" unless defined?(Gem)
-require "ostruct"
-require "openssl"
+require "ostruct" unless defined?(OpenStruct)
+require "openssl" unless defined?(OpenSSL)
require "mixlib/authentication/signatureverification"
-require "time"
-require "net/ssh"
+require "time" unless defined?(Time)
+require "net/ssh" unless defined?(Net::SSH)
# TODO: should make these regular spec-based mock objects.
class MockRequest
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 4fd27f0..f10ee93 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -19,4 +19,4 @@
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")) # lib in mixlib-authentication
-require "rubygems"
+require "rubygems" unless defined?(Gem)