Hi all, I am finally starting to use the testing framework that rails provides, however I have come across a problem that I can''t work out. Our model has a serialized hash as one of the members, and I can''t work out the syntax in the YML file to populate the hash during testing. Any suggestions? Cheers Simon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Never mind
After stepping back and actually thinking about what I was trying to
achieve, I worked it out.
For those of you following at home from a google search, here is how to do
it.
one:
id: 1
options: {name1: value1, name2: value2}
Cheers
Simon
------- Forwarded message -------
From: "Simon Macneall"
<macneall-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org"
<rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Cc:
Subject: Loading Hash during testing using Fixtures
Date: Wed, 07 Jan 2009 15:46:57 +0900
Hi all,
I am finally starting to use the testing framework that rails provides,
however I have come across a problem that I can''t work out.
Our model has a serialized hash as one of the members, and I can''t work
out the syntax in the YML file to populate the hash during testing.
Any suggestions?
Cheers
Simon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
> one: > id: 1 > options: {name1: value1, name2: value2}This might be cleaner: one: options: name1: value1 name2: value2 And note you don''t need the id: 1 no more. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---