Sha256: b27b6dd1a942872e545bae4d99f631b4cf04b37ef95297af272d168856d53882
Contents?: true
Size: 592 Bytes
Versions: 5
Compression:
Stored size: 592 Bytes
Contents
require 'machinist/active_record' require 'sham' require 'faker' Sham.define do city { Faker::Address.city } business { Faker::Company.name } tag { Faker::Lorem.words(1) } end City.blueprint do name { Sham.city } end Business.blueprint do city { City.make } name { Sham.business } active true end Tag.blueprint do name { Sham.tag } published true end Tagging.blueprint do business { Business.make } tag { Tag.make } end def tag_business(business, tag_name) tag = Tag.find_by_name(tag_name) || Tag.make(:name => tag_name) Tagging.make(:tag => tag, :business => business) end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
buscar-1.0.4 | spec/blueprint.rb |
buscar-1.0.3 | spec/blueprint.rb |
buscar-1.0.2 | spec/blueprint.rb |
buscar-1.0.1 | spec/blueprint.rb |
buscar-1.0.0 | spec/blueprint.rb |