ensl.org/spec/factories/server.rb

17 lines
328 B
Ruby
Raw Permalink Normal View History

2015-05-14 16:27:12 +00:00
FactoryGirl.define do
2015-08-01 15:20:49 +00:00
factory :server do
sequence(:name) { |n| "ServerName#{n}" }
sequence(:dns) { |n| "DNS#{n}" }
sequence(:ip) { |n| "192.168.#{n % 255}.#{n}" }
sequence(:port) { |n| "#{1000 + n}" }
trait :active do
active true
end
trait :inactive do
active false
end
end
2015-11-07 06:21:31 +00:00
end