Sha256: ca686a7499e85ab7b3747d6bf26d5dcb45a1eafdb351f9c1230a283de1598144
Contents?: true
Size: 1.48 KB
Versions: 1
Compression:
Stored size: 1.48 KB
Contents
require "rails/generators" module TestData class InitializerGenerator < Rails::Generators::Base def call create_file "config/initializers/test_data.rb", <<~RUBY return unless defined?(TestData) TestData.config do |config| # Where to store SQL dumps of the test_data database schema # config.schema_dump_path = "test/support/test_data/schema.sql" # Where to store SQL dumps of the test_data database test data # config.data_dump_path = "test/support/test_data/data.sql" # Where to store SQL dumps of the test_data database non-test data # config.non_test_data_dump_path = "test/support/test_data/non_test_data.sql" # Tables whose data shouldn't be loaded into tests. # ("ar_internal_metadata" and "schema_migrations" are always excluded) # config.non_test_data_tables = [] # Tables whose data should be excluded from SQL dumps (still dumps their schema DDL) # config.dont_dump_these_tables = [] # Tables whose data should be truncated by TestData.truncate # If left as `nil`, all tables inserted into by the SQL file at # `data_dump_path` will be truncated # config.truncate_these_test_data_tables = nil # Log level (valid values: [:debug, :info, :warn, :error, :quiet]) # Can also be set with env var TEST_DATA_LOG_LEVEL # config.log_level = :info end RUBY end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
test_data-0.0.2 | lib/generators/test_data/initializer_generator.rb |