File: crypt_spec.rb

package info (click to toggle)
ruby-mongo 2.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,020 kB
  • sloc: ruby: 110,810; makefile: 5
file content (21 lines) | stat: -rw-r--r-- 638 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

describe Mongo::Crypt do
  describe '.validate_ffi!' do
    context 'when ffi is available' do
      context 'when ffi is loaded' do
        it 'does not raise' do
          expect do
            described_class.validate_ffi!
          end.not_to raise_error
        end
      end
    end
    # There is no reasonably simple way to test the path where ffi is not
    # available. The ffi gem is a part of our standard test dependencies, so
    # it's always available. So, we would need a dedicated configuration
    # just to test this feature; it seems to be an overhead.
  end
end