Sha256: dd54e33ae9dd83722e5243808c2be830d555069c500bec04d5b6d6f2ce883b81

Contents?: true

Size: 314 Bytes

Versions: 82

Compression:

Stored size: 314 Bytes

Contents

require 'securerandom'

module RandomHelper
  def random_str(length = 16)
    SecureRandom.hex(length).encode(Encoding::UTF_8)
  end

  def random_int_str(size = 1_000_000_000)
    SecureRandom.random_number(size).to_s.encode(Encoding::UTF_8)
  end

  RSpec.configure do |config|
    config.include self
  end
end

Version data entries

82 entries across 82 versions & 2 rubygems

Version Path
ably-rest-1.2.7 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.2.7 spec/support/random_helper.rb
ably-rest-1.2.6 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.2.6 spec/support/random_helper.rb
ably-rest-1.2.4 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.2.4 spec/support/random_helper.rb
ably-rest-1.2.3 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.2.3 spec/support/random_helper.rb
ably-rest-1.2.2 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.2.2 spec/support/random_helper.rb
ably-rest-1.2.1 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.2.1 spec/support/random_helper.rb
ably-rest-1.2.0 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.2.0 spec/support/random_helper.rb
ably-rest-1.1.8 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.1.8 spec/support/random_helper.rb
ably-rest-1.1.7 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.1.7 spec/support/random_helper.rb
ably-rest-1.1.6 lib/submodules/ably-ruby/spec/support/random_helper.rb
ably-1.1.6 spec/support/random_helper.rb