Permalink
Browse files

Now you can use Ruby to configure you config.yml like in Rails fixtures.

Example:

host: <%=`hostname`.gsub(/\n/, '')%>
port_start: 4000
port_end: 4001
max_browser_duration: 1440
  • Loading branch information...
1 parent f8bbd55 commit a5e0888f9f9d31080b12efe338498e3571be74e2 @tapajos tapajos committed Jul 30, 2008
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/selenium_on_rails_config.rb
View
3 lib/selenium_on_rails_config.rb
@@ -1,4 +1,5 @@
require 'yaml'
+require 'erb'
class SeleniumOnRailsConfig
@@defaults = {:environments => ['test']}
@@ -16,7 +17,7 @@ def self.configs
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)
+ @@configs = YAML.load(ERB.new(IO.read(file)).result) if File.exist?(file)
end
@@configs ||= {}
end

0 comments on commit a5e0888

Please sign in to comment.