Sha256: 8043e064d7cadb63760773fc73a4915c91f604cc7da4c617e59497c00cc3dd44

Contents?: true

Size: 878 Bytes

Versions: 1

Compression:

Stored size: 878 Bytes

Contents

= test_dummy

Test Dummy is an easy fake data generator library with the ability to create
fake models or entirely faked data structures on-demand.

After installing the gem, methods to declare how to fake data are made
available within ActiveRecord-derived models. There are several ways to
declare how to dummy something:

    class MyModel < ActiveRecord::Base
      # Pass a block that defines how to dummy this attribute
      to_dummy :name do
        "user%d" % rand(10e6)
      end
      
      # Pass a block that defines how to dummy several attributes
      to_dummy :password, :password_confirmation do
        'tester'
      end
      
      # Use one of the pre-defined helper methods to dummy this attribute
      to_dummy :nickname, :use => :random_phonetic_string
    end
    
A standard method

== Copyright

Copyright (c) 2010 Scott Tadman, The Working Group

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
test_dummy-0.1.4 README.rdoc