Permalink
Browse files

look for config file in config/selenium.yml instead of having to plac…

…e config.yml in plugin dir
  • Loading branch information...
1 parent 3a00e39 commit aedeaa71ee9fd619bf19e0c6ad5e1d2e4a26a82b @ryanb committed Jun 30, 2008
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/selenium_on_rails_config.rb
@@ -13,10 +13,13 @@ def self.get var, default = nil
private
def self.configs
unless defined? @@configs
- file = File.expand_path(File.dirname(__FILE__) + '/../config.yml')
- @@configs = File.exist?(file) ? YAML.load_file(file) : {}
+ files = [File.expand_path(File.dirname(__FILE__) + '/../config.yml')]
+ files << File.join(RAILS_ROOT, 'config', 'selenium.yml')
+ files.each do |file|
+ @@configs = YAML.load_file(file) if File.exist?(file)
+ end
+ @@configs ||= {}
end
@@configs
end
-
end

0 comments on commit aedeaa7

Please sign in to comment.