From: Jam Date: 2012-07-11T00:06:04+09:00 Subject: Re: read and store definitions from an outer file On Jul 10, 2012, at 7:34 AM, firstsense sdasad wrote: > Hi guys, I am a newcomer to Ruby, i got into it by having to make > testing scripts for my company. I have not had such problem that i > couldn't solve by reading, but now I encountered one. I have made some > test suites using watir gem which include definitons like user name and > test page address. But if i move to an other environment i have to > modify these for each test suite. What i would like to achieve: I would > like to have a single file(testreq.txt for example) containing these > definitions and I would like to make my test suites to read and store > these values from my testreq.txt file. Thank you very much for your help > in advance! > > Best wishes, > Alex > > -- > Posted via http://www.ruby-forum.com/. Hey, I normally use a module filled with constants. Module foo PropertyOne="some value" End Then just require the module from somewhere else. If you have complex config needs, try serialising data structures to and from Yaml. Jams