Skip to content

Instantly share code, notes, and snippets.

@americos
Created January 11, 2011 15:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save americos/774589 to your computer and use it in GitHub Desktop.
Save americos/774589 to your computer and use it in GitHub Desktop.
Lines needed on features/suppor/env.rb to enable selenium automated browser testing
#Remember to get the proper gems on your gem file:
# gem 'database_cleaner', '>= 0.5.2'
# gem 'selenium-client', '>= 1.2.18'
# then: bundle install
#Step 1 for using Selenium. This goes after ActionContoller allow_resque line /Americo
Cucumber::Rails::World.use_transactional_fixtures = false
#Step 2 for using Selenium This goes at the bottom of the file /Americo
class ActiveSupport::TestCase
setup do |session|
session.host! "localhost:3001"
end
end
#Step 3 for using Selenium This goes right after the require section /Americo
Webrat.configure do |config|
config.mode = :selenium #:rack
config.application_framework = :rack #new line
config.open_error_files = false # Set to true if you want error pages to pop up in the browser
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment