diff --git a/spec/support/rails_template.rb b/spec/support/rails_template.rb index 7dcd1b6a58d..85f7df8b490 100644 --- a/spec/support/rails_template.rb +++ b/spec/support/rails_template.rb @@ -97,11 +97,12 @@ def self.ransackable_associations(auth_object=nil) # Add some translations append_file "config/locales/en.yml", File.read(File.expand_path("templates/en.yml", __dir__)) -# Add predefined admin resources +# Add predefined admin resources, override any file that was generated by rails new generator directory File.expand_path("templates/admin", __dir__), "app/admin" # Add predefined policies directory File.expand_path("templates/policies", __dir__), "app/policies" +directory File.expand_path("templates/public", __dir__), "public", force: true if ENV["RAILS_ENV"] != "test" inject_into_file "config/routes.rb", "\n root to: redirect('admin')", after: /.*routes.draw do/ diff --git a/spec/support/templates/public/favicon.ico b/spec/support/templates/public/favicon.ico new file mode 100644 index 00000000000..db016de0d55 Binary files /dev/null and b/spec/support/templates/public/favicon.ico differ