删除随机生成字符串函数
This commit is contained in:
parent
0a65ac2a35
commit
86bebaf71c
|
@ -1,3 +0,0 @@
|
|||
def generateRandomString(min_len, max_len)
|
||||
Faker::Internet.password(min_len, max_len)
|
||||
end
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue