Sha256: 9b6da8ff8f7a1cc290ad894bbf3174d708e6433f57772b2da522842b77dcfae7

Contents?: true

Size: 395 Bytes

Versions: 56

Compression:

Stored size: 395 Bytes

Contents

require 'machinist/active_record'
require 'sham'
require 'faker'

Sham.define do
  name { Faker::Name.name }
  number(:unique => false) { rand(100) + 1 }
  date { Date.parse("#{rand(40) + 1970}-#{rand(12) + 1}-#{rand(28) + 1}") }
end

City.blueprint do
  name
  country
end

Country.blueprint do
  name
end

Person.blueprint do
  name
  age { Sham::number }
  birthday { Sham::date }
  city
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
rgviz-rails-0.60 spec/blueprints.rb
rgviz-rails-0.59 spec/blueprints.rb
rgviz-rails-0.58 spec/blueprints.rb
rgviz-rails-0.57 spec/blueprints.rb
rgviz-rails-0.56 spec/blueprints.rb
rgviz-rails-0.55 spec/blueprints.rb
rgviz-rails-0.54 spec/blueprints.rb
rgviz-rails-0.53 spec/blueprints.rb
rgviz-rails-0.52 spec/blueprints.rb
rgviz-rails-0.51 spec/blueprints.rb
rgviz-rails-0.50 spec/blueprints.rb
rgviz-rails-0.49 spec/blueprints.rb
rgviz-rails-0.48 spec/blueprints.rb
rgviz-rails-0.47 spec/blueprints.rb
rgviz-rails-0.46 spec/blueprints.rb
rgviz-rails-0.45 spec/blueprints.rb
rgviz-rails-0.44 spec/blueprints.rb
rgviz-rails-0.42 spec/blueprints.rb
rgviz-rails-0.41 spec/blueprints.rb
rgviz-rails-0.40 spec/blueprints.rb