Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit a5e0888f9f9d31080b12efe338498e3571be74e2 1 parent f8bbd55
@tapajos tapajos authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.