public
Description: This repo is no longer maintained, see the official repository by paytonrules.
Homepage: http://selenium-on-rails.openqa.org/
Clone URL: git://github.com/ryanb/selenium-on-rails.git
selenium-on-rails / init.rb
100644 21 lines (16 sloc) 0.623 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'selenium_on_rails_config'
envs = SeleniumOnRailsConfig.get :environments
 
if envs.include? RAILS_ENV
  #initialize the plugin
  $LOAD_PATH << File.dirname(__FILE__) + "/lib/controllers"
  require 'selenium_controller'
  require File.dirname(__FILE__) + '/routes'
  
  SeleniumController.prepend_view_path File.expand_path(File.dirname(__FILE__) + '/lib/views')
else
  #erase all traces
  $LOAD_PATH.delete lib_path
  
  #but help user figure out what to do
  unless RAILS_ENV == 'production' # don't pollute production
    require File.dirname(__FILE__) + '/switch_environment/init'
  end
end