未验证 提交 e4af759b 编写于 作者: E eileencodes

Use default argument in test

We should use a default argument so that when there is only one option
we can delete the arguments instead of updating all the callers.
上级 854587c2
......@@ -85,7 +85,7 @@ def db_migrate_and_schema_cache_dump_and_schema_cache_clear
end
end
def db_migrate_and_schema_dump_and_load(schema_format)
def db_migrate_and_schema_dump_and_load(schema_format = "ruby")
add_to_config "config.active_record.schema_format = :#{schema_format}"
require "#{app_path}/config/environment"
......@@ -428,7 +428,7 @@ def generate_models_for_animals
end
test "db:migrate and db:schema:dump and db:schema:load works on all databases" do
db_migrate_and_schema_dump_and_load "ruby"
db_migrate_and_schema_dump_and_load
end
test "db:migrate and db:schema:dump and db:schema:load works on all databases with sql option" do
......@@ -692,7 +692,7 @@ class TwoMigration < ActiveRecord::Migration::Current
ENV.delete "RAILS_ENV"
ENV.delete "RACK_ENV"
db_migrate_and_schema_dump_and_load "ruby"
db_migrate_and_schema_dump_and_load
app_file "db/seeds.rb", <<-RUBY
print Book.connection.pool.db_config.database
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册