summaryrefslogtreecommitdiff
path: root/spec/ruby/library/securerandom/random_bytes_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/securerandom/random_bytes_spec.rb')
-rw-r--r--spec/ruby/library/securerandom/random_bytes_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/library/securerandom/random_bytes_spec.rb b/spec/ruby/library/securerandom/random_bytes_spec.rb
index 275a897315..2794174f40 100644
--- a/spec/ruby/library/securerandom/random_bytes_spec.rb
+++ b/spec/ruby/library/securerandom/random_bytes_spec.rb
@@ -1,8 +1,12 @@
require_relative '../../spec_helper'
+require_relative '../../core/random/shared/bytes'
require 'securerandom'
describe "SecureRandom.random_bytes" do
+ it_behaves_like :random_bytes, :random_bytes, SecureRandom
+ it_behaves_like :random_bytes, :bytes, SecureRandom
+
it "generates a random binary string of length 16 if no argument is provided" do
bytes = SecureRandom.random_bytes
bytes.should be_kind_of(String)