public
Description: Who's your daddy? Kill Rails fixtures, Don't Repeat Yourself, reduce the complexity of your tests.
Homepage: http://tasks.ogtastic.com/projects/show/object-daddy
Clone URL: git://github.com/flogic/object_daddy.git
Search Repo:
Making the README a little more clear when explaining the 
literal-value-hash issue.
ymendel (author)
Thu Jun 26 20:04:32 -0700 2008
commit  508164707f870a6618a3b62cc15bd673959f3476
tree    b57962f98cb8ed3fa3fe87c322f59fba957ca542
parent  061d6a62978e0b6d178436c6874bdbaf55bd4fab
0
...
195
196
197
198
199
 
 
200
201
202
203
 
 
204
205
 
 
206
207
208
...
195
196
197
 
 
198
199
200
201
 
 
202
203
204
205
206
207
208
209
210
0
@@ -195,14 +195,16 @@ own, I suppose.
0
 
0
 == Known Issues
0
 
0
-The simple invocation forms for generator_for when using literal values (as seen below)
0
-do not work if the literal value is a Hash. Don't do that.
0
+The simple invocation forms for generator_for when using literal values do not
0
+work if the literal value is a Hash. Don't do that.
0
 
0
 class User < ActiveRecord::Base
0
- generator_for :name, 'Joe'
0
- generator_for :age => 25
0
+ generator_for :thing_hash, { 'some key' => 'some value' }
0
+ generator_for :other_hash => { 'other key' => 'other value' }
0
 end
0
 
0
+I'm not sure why this would even ever come up, but seriously, don't.
0
+
0
 
0
 Required belongs_to associations are automatically generated when generating an instance,
0
 but only if necessary.

Comments

    No one has commented yet.