Update selenium on rails using 'official' git repo

git://github.com/paytonrules/selenium-on-rails.git
This commit is contained in:
Reinier Balt 2008-12-02 10:05:41 +01:00
parent 198f3240b8
commit 9b504b3e47
159 changed files with 16409 additions and 11794 deletions

View file

@ -1,22 +1,26 @@
require 'yaml'
class SeleniumOnRailsConfig
@@defaults = {:environments => ['test']}
def self.get var, default = nil
value = configs[var.to_s]
value ||= @@defaults[var]
value ||= default
value ||= yield if block_given?
value
end
private
def self.configs
unless defined? @@configs
file = File.expand_path(File.dirname(__FILE__) + '/../config.yml')
@@configs = File.exist?(file) ? YAML.load_file(file) : {}
end
@@configs
end
end
require 'yaml'
class SeleniumOnRailsConfig
attr_accessor :configs
def initialize
@defaults = {:environments => ['test']}
initialize_configs
end
def get var, default = nil
value = @configs[var.to_s]
value ||= @defaults[var]
value ||= default
value ||= yield if block_given?
value
end
def initialize_configs
@configs = {}
files = [File.expand_path(File.dirname(__FILE__) + '/../config.yml')]
files << File.join(RAILS_ROOT, 'config', 'selenium.yml')
files.each { |file| @configs = YAML.load_file(file) if File.exist?(file) }
end
end