Hey, when I run ''rake test_units'', I get the following error message: 1) Error: test_truth(JobTest): Fixture::FormatError: a YAML error occured parsing ./test/unit/../fixtures/jobs.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Please have a look at http://www.yaml.org/faq.html And here''s the fixture file: # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html job1: id: 1 category_id: 1 title: "Installer Windows 98" description: "Installer Windows 98 sur le poste à Anne-Marie Lupien" created_on: <%= Date.today.strftime("%Y-%m-%d") %> modified_on: <%= Date.today.strftime("%Y-%m-%d") %> deadline: <%= (Date.today + 1).strftime("%Y-%m-%d") %> finished_on: 0000-00-00 finished: 0 time: 0 cost: 0 client: "Anne-Marie Lupien" phone: "450-373-2420" priority_id: 2 job2: id: 2 category_id: 2 title: "Nettoyer imprimante" description: "Nettoyer l''imprimante de Nathalie Godin" created_on: <%= Date.today.strftime("%Y-%m-%d") %> modified_on: <%= Date.today.strftime("%Y-%m-%d") %> deadline: <%= (Date.today - 1).strftime("%Y-%m-%d") %> finished_on: 0000-00-00 finished: 0 time: 0 cost: 0 client: "Nathalie Godin" phone: "450-373-1270" priority_id: 1 Does anything seem wrong? Vincent. -- Vincent Foley-Bourgon Blog: http://www.livejournal.com/~gnuvince World.run while (6 * 9 == 42) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I''ve been getting the exact same error and with a properly made fixture, but in my case, its just data for a table (many-to-many join table actually) with no corresponding model, the don''t know if its related but its the exact same error. Vincent Foley wrote:> Hey, > > when I run ''rake test_units'', I get the following error message: > > 1) Error: > test_truth(JobTest): > Fixture::FormatError: a YAML error occured parsing > ./test/unit/../fixtures/jobs.yml. Please note that YAML must be > consistently indented using spaces. Tabs are not allowed. Please have > a look at http://www.yaml.org/faq.html > > And here''s the fixture file: > > # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html > job1: > id: 1 > category_id: 1 > title: "Installer Windows 98" > description: "Installer Windows 98 sur le poste à Anne-Marie Lupien" > created_on: <%= Date.today.strftime("%Y-%m-%d") %> > modified_on: <%= Date.today.strftime("%Y-%m-%d") %> > deadline: <%= (Date.today + 1).strftime("%Y-%m-%d") %> > finished_on: 0000-00-00 > finished: 0 > time: 0 > cost: 0 > client: "Anne-Marie Lupien" > phone: "450-373-2420" > priority_id: 2 > > job2: > id: 2 > category_id: 2 > title: "Nettoyer imprimante" > description: "Nettoyer l''imprimante de Nathalie Godin" > created_on: <%= Date.today.strftime("%Y-%m-%d") %> > modified_on: <%= Date.today.strftime("%Y-%m-%d") %> > deadline: <%= (Date.today - 1).strftime("%Y-%m-%d") %> > finished_on: 0000-00-00 > finished: 0 > time: 0 > cost: 0 > client: "Nathalie Godin" > phone: "450-373-1270" > priority_id: 1 > > Does anything seem wrong? > > Vincent. > > -- > Vincent Foley-Bourgon > Blog: http://www.livejournal.com/~gnuvince > <http://www.livejournal.com/%7Egnuvince> > World.run while (6 * 9 == 42) > >------------------------------------------------------------------------ > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >
On 27-apr-05, at 1:56, Vincent Foley wrote:> Hey, > > when I run ''rake test_units'', I get the following error message: > > 1) Error: > test_truth(JobTest): > Fixture::FormatError: a YAML error occured parsing > ./test/unit/../fixtures/jobs.yml. Please note that YAML must be > consistently indented using spaces. Tabs are not allowed. Please have > a look at http://www.yaml.org/faq.html >I have to dig into this deeper, but I also started trying out tests and fixtures and it looks like parsers (both CSV and YAML) don''t grok anything beyound the basic ASCII (pain, pain, pain again). Try removing accented letters from your fixtures. P.S. What I find so nice is that you even don''t see a line where parsing was stopped. How cool is that for frustration? :-) -- Julian "Julik" Tarkhanov