Fixtures go foxy 3

Posted by pratik
on Friday, October 26

With Changeset 8036

Following

1
2
3
4
5
6
7
8
9
10
11
# clients.yml
monkeys: 
  id: 1 
  name: 3 Monkeys Ltd.

# employees.yml 

lifo: 
  id: 1 
  name: Pratik
  client_id: 1

Now can be re-written as

1
2
3
4
5
6
7
8
9
# clients.yml
monkeys: 
  name: 3 Monkeys Ltd.

# employees.yml 

lifo: 
  name: Pratik
  client: monkeys 

There are some more goodies there as well. Please check out documentation and code for more details.

P.S -> Now there is a built-in performance and benchmarking support as well. Just do rake rails:update:scripts to get them in your app running bleeding edge.

Comments

Leave a response

  1. Jack DangerOctober 26, 2007 @ 07:03 PM

    Awesome. Thanks for pointing out the changeset.

    For the record: I prefer ‘foxy fixtures’ to ‘rathole’ :-)

  2. Dan KubbOctober 27, 2007 @ 06:34 AM

    From what I’ve read you can even shave off another line in each fixture file, the id: no longer needs to be specified either.

  3. Andrew VitOctober 27, 2007 @ 10:49 AM

    3monkeys is a bad choice for a key name… Your symbol would have to be quoted in your tests! But yes, we do get the point…it’s a cool change. :^)

Comment