From 2b331e9098c489791031ee17f683ca8be92f7bba Mon Sep 17 00:00:00 2001 From: Eugene Kenny Date: Sun, 23 Jul 2017 11:09:15 +0100 Subject: Avoid modifying frozen string in check_schema_file This was missed when the frozen string literal pragma was added to this file because the string is only modified when running in the context of a full Rails app, which wasn't covered by the test suite. --- railties/test/application/rake/dbs_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'railties') diff --git a/railties/test/application/rake/dbs_test.rb b/railties/test/application/rake/dbs_test.rb index c63f23fa0a..9e612f1526 100644 --- a/railties/test/application/rake/dbs_test.rb +++ b/railties/test/application/rake/dbs_test.rb @@ -259,6 +259,13 @@ module ApplicationTests end end + test "db:schema:load fails if schema.rb doesn't exist yet" do + Dir.chdir(app_path) do + stderr_output = capture(:stderr) { `bin/rails db:schema:load` } + assert_match /Run `rails db:migrate` to create it/, stderr_output + end + end + def db_test_load_structure Dir.chdir(app_path) do `bin/rails generate model book title:string; -- cgit v1.2.3