2
由於一個繁重的項目,我遇到了麻煩,黃瓜的數據庫重建過程確實需要很長時間。黃瓜阻止清除數據庫
由於它是一個應用程序,其表的實際內容並不重要,我想跳過重建過程。
不幸的是,黃瓜和database_cleaner似乎都支持這個,不是嗎?
我的黃瓜ENV設置可能低於
感謝和許多方面可以發現,
喬
ENV["RAILS_ENV"] ||= "cucumber"
require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
require 'cucumber/formatter/unicode' # Remove this line if you don't want Cucumber Unicode support
require 'cucumber/rails/world'
require 'cucumber/rails/active_record'
require 'cucumber/web/tableish'
require 'capybara/rails'
require 'capybara/cucumber'
require 'capybara/session'
require 'cucumber/rails/capybara_javascript_emulation'
Capybara.default_selector = :css
ActionController::Base.allow_rescue = false
Cucumber::Rails::World.use_transactional_fixtures = false
Capybara.default_driver = :selenium
if defined?(ActiveRecord::Base)
begin
require 'database_cleaner'
DatabaseCleaner.strategy = :truncation
rescue LoadError => ignore_if_database_cleaner_not_present
end
end
也許ping黃瓜組 – rogerdpack 2010-08-23 16:36:16