提交 8e1dca10 编写于 作者: Y yuuji.yaginuma

Remove unnecessary migration deletion

Since isolation application is generated with the `--skip-gemfile`
option, so `active_storage:install` is not executed.
上级 67db41aa
......@@ -16,8 +16,6 @@ def teardown
def test_bin_setup
Dir.chdir(app_path) do
FileUtils.rm_rf("db/migrate")
app_file "db/schema.rb", <<-RUBY
ActiveRecord::Schema.define(version: 20140423102712) do
create_table(:articles) {}
......@@ -39,8 +37,6 @@ def test_bin_setup
def test_bin_setup_output
Dir.chdir(app_path) do
FileUtils.rm_rf("db/migrate")
app_file "db/schema.rb", ""
output = `bin/setup 2>&1`
......
......@@ -26,7 +26,6 @@ def teardown
test "config.ru can be racked up" do
Dir.chdir app_path do
FileUtils.rm_rf("db/migrate")
@app = rackup
assert_welcome get("/")
end
......
......@@ -287,8 +287,6 @@ def db_test_load_structure
ENV.delete "RAILS_ENV"
ENV.delete "RACK_ENV"
Dir.chdir(app_path) { FileUtils.rm_rf("db/migrate") }
app_file "db/schema.rb", <<-RUBY
ActiveRecord::Schema.define(version: "1") do
create_table :users do |t|
......@@ -310,8 +308,6 @@ def db_test_load_structure
end
test "db:setup sets ar_internal_metadata" do
Dir.chdir(app_path) { FileUtils.rm_rf("db/migrate") }
app_file "db/schema.rb", ""
rails "db:setup"
......
......@@ -11,7 +11,6 @@ class TestRunnerTest < ActiveSupport::TestCase
def setup
build_app
create_schema
remove_migrations
end
def teardown
......@@ -728,10 +727,6 @@ def create_schema
app_file "db/schema.rb", ""
end
def remove_migrations
Dir.chdir(app_path) { FileUtils.rm_rf("db/migrate") }
end
def create_test_file(path = :unit, name = "test", pass: true)
app_file "test/#{path}/#{name}_test.rb", <<-RUBY
require 'test_helper'
......
......@@ -8,7 +8,6 @@ class TestTest < ActiveSupport::TestCase
def setup
build_app
remove_migrations
end
def teardown
......@@ -321,10 +320,6 @@ class UserTest < ActiveSupport::TestCase
end
private
def remove_migrations
Dir.chdir(app_path) { FileUtils.rm_rf("db/migrate") }
end
def assert_unsuccessful_run(name, message)
result = run_test_file(name)
assert_not_equal 0, $?.to_i
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册