Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A ridiculously simple fixtures replacement for your web framework of choice.

tree: 93ee741b89

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 init.rb
README
Spawner
=========================

Spawner is a simple fixtures replacement. In the examples
I use Faker to generate random data, but you can use any method.

Usage:

class User < ActiveRecord::Base
  spawner do |user|
    user.name = Faker::Name.name
    user.email = Faker::Internet.email
  end
end

Then, in your test or in any other place:

@user = User.spawn

Or, if you need something special:

@user = User.spawn do |user|
  user.name = "Larralde!"
end

Copyright (c) 2008 Michel Martens for CitrusByte (http://www.citrusbyte.com), released under the MIT license.
Something went wrong with that request. Please try again.