Skip to content

Commit

Permalink
add nacl spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jshawl committed Feb 19, 2024
1 parent b27a32f commit 3cde75a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/minisign/nacl_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

describe Minisign::NaCl do
it 'raises LibSodiumDependencyErro if libsodium not installed' do
hash = RbNaCl.send(:remove_const, :Hash)
expect do
Minisign::NaCl::Hash::Blake2b.digest('message', { digest_size: 32 })
end.to raise_error(Minisign::LibSodiumDependencyError)
RbNaCl.const_set(:Hash, hash)
end
end

0 comments on commit 3cde75a

Please sign in to comment.