删除随机生成字符串函数

This commit is contained in:
ccx1024cc 2016-12-15 09:56:40 +08:00
parent 0a65ac2a35
commit 86bebaf71c
4 changed files with 2 additions and 6 deletions

View File

@ -1,3 +0,0 @@
def generateRandomString(min_len, max_len)
Faker::Internet.password(min_len, max_len)
end

View File

@ -8,7 +8,7 @@ FactoryGirl.define do
end
factory :project_name_length_gt_20 do
name { generateRandomString(51, 51)}
name { Faker::Internet.password(51, 51) }
end
end
end

View File

@ -11,7 +11,7 @@ FactoryGirl.define do
end
factory :user_name_length_gt_30 do
name generateRandomString(31, 31)
name Faker::Internet.password(31, 31)
end
factory :user_email_length_gt_50 do

View File

@ -5,7 +5,6 @@ require File.expand_path('../../config/environment', __FILE__)
abort("The Rails environment is running in production mode!") if Rails.env.production?
require 'spec_helper'
require 'rspec/rails'
require 'factories/factory_helper' # 添加预固件辅助器
# Add additional requires below this line. Rails is not loaded until this point!
# Requires supporting ruby files with custom matchers and macros, etc, in