finish upgrade of selenium

these were manual cherry-picks of the rails upgrade work.
This commit is contained in:
Reinier Balt 2010-07-27 23:32:22 +02:00
parent 551eab19a5
commit e2841e31eb
9 changed files with 80 additions and 48 deletions

View file

@ -0,0 +1,2 @@
require 'factory_girl'
Dir.glob(File.join(File.dirname(__FILE__), '../../spec/factories/*.rb')).each {|f| require f }

View file

@ -9,7 +9,23 @@ module NavigationHelpers
case page_name
when /the home\s?page/
'/'
root_path
when /the statistics page/
stats_path
when /the signup page/
signup_path
when /the login page/
login_path
when /the notes page/
notes_path
when /the contexts page/
contexts_path
when /the manage users page/
users_path
when /the repeating todos page/
recurring_todos_path
when /the integrations page/
integrations_path
# Add more mappings here.
# Here is an example that pulls values out of the Regexp:

View file

@ -1,22 +1,13 @@
Webrat.configure do |config|
config.mode = :selenium
config.application_environment = :selenium
config.selenium_browser_startup_timeout = 30
#config.selenium_server_address = "localhost"
end
if ENV["RAILS_ENV"] == "selenium"
puts "Configuring to use Selenium with Webrat for Cucumber stories"
Webrat.configure do |config|
config.mode = :selenium
config.application_environment = :selenium
config.selenium_browser_startup_timeout = 30
# use only if you run a separate selenium server instance and do not
# want webrat to start one for you
#config.selenium_server_address = "localhost"
end
Cucumber::Rails::World.use_transactional_fixtures = false
require 'database_cleaner'
# clean the database once when starting
DatabaseCleaner.clean_with :truncation
DatabaseCleaner.strategy = :truncation
Before do
DatabaseCleaner.start
end
After do
DatabaseCleaner.clean
end
Cucumber::Rails::World.use_transactional_fixtures = false
end