ensl.org/spec/factories/server.rb
2015-08-01 16:20:49 +01:00

16 lines
No EOL
327 B
Ruby

FactoryGirl.define do
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
end