[rspec-users] Parsing Variables from the RakeFile to spec_helper
Togetherne Togetherne
lists at ruby-forum.com
Thu Nov 6 04:52:24 EST 2008
Is this possible, i basically want to create a loop in my Rakefile which
updates a variable in my spec file with every run the variable is
something like:
browser = ENV['SELENIUM_RC_BROWSER'] || "*chrome"
in my spec_helper i have:
def create_selenium_driver
remote_control_server = ENV['SELENIUM_RC_HOST'] || "localhost"
port = ENV['SELENIUM_RC_PORT'] || 4444
browser = ENV['SELENIUM_RC_BROWSER']
#browser = ENV['SELENIUM_RC_BROWSER'] || "*chrome"
timeout = ENV['SELENIUM_RC_TIMEOUT'] || 200
application_host = ENV['SELENIUM_APPLICATION_HOST'] || ""
#application_port = ENV['SELENIUM_APPLICATION_PORT'] || ""
@selenium_driver = Selenium::Client::Driver.new(
remote_control_server, port, browser,
"http://#{application_host}", timeout)
end
I basically want to change the browser variable in my RakeFile and parse
it to my spechelper so i can change it with every run.....any ideas?
--
Posted via http://www.ruby-forum.com/.
More information about the rspec-users
mailing list