diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 913e28a6..2ec8f7d0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -90,3 +90,8 @@ RSpec.configure do |config| Kernel.srand config.seed =end end + +def random_string(length = 10) + o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten + string = (0...length).map { o[rand(o.length)] }.join +end