rake
特定/すべてのテストを実行すると、開発データベースが破損します。
各環境のdbが異なることを確認しました。
データベース.yml
postgre_common_config: &postgre_common_config
adapter: postgresql
encoding: unicode
pool: 5
username: postgres # if using default PostgreSQL user then the value should be: postgres
password: postgres
host: localhost
development:
database: mag_development
<<: *postgre_common_config
test:
database: mag_test
<<: *postgre_common_config
production:
database: mag_production
<<: *postgre_common_config
test_helper.rb
ENV['RAILS_ENV'] = 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
fixtures :all
end
特定の機能を手動でテストするためのデータを準備するには多くの時間がかかるため、これは非常に面倒です。助けてください。