From: Thomas Preymesser Date: 2008-12-25T09:34:45+09:00 Subject: Re: Testing Data Scrapes 2008/12/25 Michael Boutros : > Hello all, > > I'm here not for code help, but more for some opinions. At the moment > I'm writing a library to interact with Snipt. However, I have no idea > how to test it. I don't want to include my username and password in the > tests, I'm doing it this way: # Creates a new Google spreadsheet object. def initialize(spreadsheetkey,user=nil,password=nil) @filename = spreadsheetkey @spreadsheetkey = spreadsheetkey @user = user @password = password unless user user = ENV['GOOGLE_MAIL'] end unless password password = ENV['GOOGLE_PASSWORD'] end so, if i do not provide the username and password from the test script it will be taken from environment variables. -Thomas -- Thomas Preymesser thopre@gmail.com http://thopre.googlepages.com/ http://thopre.wordpress.com/