[LRUG] problems with YAML

aidy lewis aidy.lewis at googlemail.com
Thu Feb 28 07:47:17 PST 2008


HI

Here is my YAML

test: tiscali
url:  http://tiscali3-test.vizumi.com/
register:
  first_name: aidy
  surname: smith
  email: 'testautomated6 at googlemail.com'
  password: password
  registration: KJHDF123

  This is the code that loads the yaml

  <CODE>
  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


  SmokeTest.create_from_yaml_file('C:/tiscali.yml')
  </CODE>

 The trouble I am having is that the hash within  the #register method
isnil after it is invoked.

  Aidy



More information about the Chat mailing list