Skip to content

Commit

Permalink
Improve test app creation
Browse files Browse the repository at this point in the history
- Remove unneeded libraries
  • Loading branch information
tagliala committed Aug 31, 2023
1 parent 0fadb08 commit 4e9c73f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace :testapp do
FileUtils.mkdir_p('tmp/aruba')
Dir.chdir('tmp') do
FileUtils.rm_rf('railsapp')
sh 'rails new railsapp --skip-bundle --skip-javascript --skip-webpack-install --skip-git'
sh 'rails new railsapp --skip-bundle --skip-javascript --skip-active-storage --skip-active-job --skip-action-text --skip-action-cable --skip-webpack-install --skip-git'
end
FileUtils.cp_r('spec/fixtures/railsapp/.', 'tmp/railsapp/')
FileUtils.rm('tmp/railsapp/Gemfile')
Expand Down
19 changes: 12 additions & 7 deletions spec/fixtures/railsapp/config/application.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
require_relative 'boot'

require 'rails/all'
require "rails"
# Pick the frameworks you want:
require "active_model/railtie"
# require "active_job/railtie"
require "active_record/railtie"
# require "active_storage/engine"
require "action_controller/railtie"
# require "action_mailer/railtie"
require "action_view/railtie"
# require "action_cable/engine"
require "sprockets/railtie"
# require "rails/test_unit/railtie"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module Railsapp
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.active_record.schema_format = :sql
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
end
end
3 changes: 0 additions & 3 deletions spec/fixtures/railsapp/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
# Show full error reports.
config.consider_all_requests_local = true

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

Expand Down

0 comments on commit 4e9c73f

Please sign in to comment.