2011-09-08 72 views
0
#/features/support/env.rb 
... 
require 'database_cleaner' 
require 'database_cleaner/cucumber' 
require 'database_cleaner/mongo_mapper/truncation' 
DatabaseCleaner.strategy = :truncation 

Before do 
    DatabaseCleaner.start 
end 

After do 
    DatabaseCleaner.clean 
end 

結果數據庫清理mongomapper和黃瓜

Exception encountered by DatabaseCleaner in Cucumber After block: ActiveRecord::ConnectionNotEstablished 

如果我之前和後擋評論 - 測試,做工精細沒有DatabaseCleaner

的REE 1.8.7-2011.03 軌(2.3.12) mongo_mapper(0.7.5) 黃瓜(0.8.7) 黃瓜導軌(0.3.2) database_cleaner(0.6.7)

回答

0

看起來像仍在使用ActiveRecord,請嘗試禁用它