spec/lib/connection_spec.rb in flexirest-1.3.16 vs spec/lib/connection_spec.rb in flexirest-1.3.17

- old
+ new

@@ -145,10 +145,10 @@ result = @connection.get("/foo", @options) auth_header = result.env.request_headers['Authorization'] expect(auth_header == "APIAuth id123:TQiQIW6vVaDC5jvh99uTNkxIg6Q=" || auth_header == "APIAuth id123:PMWBThkB8vKbvUccHvoqu9G3eVk=").to be_truthy end - if Gem.loaded_specs["api-auth"].version.to_s >= "2.0.0" + if Gem.loaded_specs["api-auth"].present? && Gem.loaded_specs["api-auth"].version.to_s >= "2.0.0" it 'should have an Authorization header with a custom digest method' do puts Gem.loaded_specs["api-auth"].version @options[:api_auth][:api_auth_options] = { digest: "sha256" }