From: Gregory Seidman Date: 2008-02-28T04:33:07+09:00 Subject: Re: YAML On Thu, Feb 28, 2008 at 04:24:58AM +0900, aidy wrote: > All I want it to read this YAML as a ruby hash and place into the > below methods. Could someone help? > > test: tiscali > url: http://tiscali3-test.vizumi.com/ > register: > first_name: aidy > surname: smith > email: 'testautomated6@googlemail.com' > password: password > registration: KJHDF123 > > tiscali= SmokeTest.new("Tiscali", "http://tiscali3-test.vizumi.com/") > tiscali.register('aidy', 'smith, 'testautomated@googlemail.com', > 'password', 'KJHDF123') require 'yaml' def SmokeTest.create_from_yaml_file(filename) data = YAML.load_file(filename) obj = new(data['test'], data['url']) obj.register(data['first_name'], data['surname'], data['email'], data['password'], data['registration']) obj end tiscali = SmokeTest.create_from_yaml_file('tiscali.yml') > Aidy --Greg