Sha256: f76bba8d4dcd3eb0f7eee632c61bfdd0c0885927d2851a7ca8c08851e62297d5
Contents?: true
Size: 364 Bytes
Versions: 11
Compression:
Stored size: 364 Bytes
Contents
module AuditedSpecHelpers def create_user(attrs = {}) User.create({:name => 'Brandon', :username => 'brandon', :password => 'password'}.merge(attrs)) end def create_versions(n = 2) User.create(:name => 'Foobar 1').tap do |u| (n - 1).times do |i| u.update_attribute :name, "Foobar #{i + 2}" end u.reload end end end
Version data entries
11 entries across 11 versions & 2 rubygems