mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove unnecessary migration deletion
Since isolation application is generated with the `--skip-gemfile` option, so `active_storage:install` is not executed.
This commit is contained in:
parent
67db41aa7f
commit
8e1dca10cd
5 changed files with 0 additions and 19 deletions
|
@ -16,8 +16,6 @@ module ApplicationTests
|
|||
|
||||
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 @@ module ApplicationTests
|
|||
|
||||
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 @@ module ApplicationTests
|
|||
|
||||
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 @@ module ApplicationTests
|
|||
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 @@ module ApplicationTests
|
|||
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 @@ module ApplicationTests
|
|||
def setup
|
||||
build_app
|
||||
create_schema
|
||||
remove_migrations
|
||||
end
|
||||
|
||||
def teardown
|
||||
|
@ -728,10 +727,6 @@ module ApplicationTests
|
|||
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 @@ module ApplicationTests
|
|||
|
||||
def setup
|
||||
build_app
|
||||
remove_migrations
|
||||
end
|
||||
|
||||
def teardown
|
||||
|
@ -321,10 +320,6 @@ Expected: ["id", "name"]
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue