Sha256: 9b10f743c58079a97247f618c159de5e5bc9b49337e67b767a272fb1aee82f4b
Contents?: true
Size: 459 Bytes
Versions: 5
Compression:
Stored size: 459 Bytes
Contents
def valid_attributes(attributes={}) { :username => "usertest", :email => generate_unique_email, :password => '123456', :password_confirmation => '123456' }.update(attributes) end def generate_unique_email @@email_count ||= 0 @@email_count += 1 "test#{@@email_count}@example.com" end def new_user(attributes={}) User.new(valid_attributes(attributes)) end def create_user(attributes={}) User.create!(valid_attributes(attributes)) end
Version data entries
5 entries across 5 versions & 1 rubygems