Sha256: 4fdad06e7248725fb3646e729a11f7527c918ecc0610b2072fad3574906b43ff
Contents?: true
Size: 559 Bytes
Versions: 3
Compression:
Stored size: 559 Bytes
Contents
# encoding: binary require "spec_helper" RSpec.describe RbNaCl::SecretBox do let(:key) { vector :secret_key } context "new" do it "accepts strings" do expect { RbNaCl::SecretBox.new(key) }.to_not raise_error end it "raises on a nil key" do expect { RbNaCl::SecretBox.new(nil) }.to raise_error(TypeError) end it "raises on a short key" do expect { RbNaCl::SecretBox.new("hello") }.to raise_error RbNaCl::LengthError end end include_examples "box" do let(:box) { RbNaCl::SecretBox.new(key) } end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rbnacl-3.4.0 | spec/rbnacl/secret_box_spec.rb |
rbnacl-3.3.0 | spec/rbnacl/secret_box_spec.rb |
rbnacl-3.2.0 | spec/rbnacl/secret_box_spec.rb |