From 07483b5f3a7d110ea9c5422fcc6e78dbeff924c6 Mon Sep 17 00:00:00 2001 From: Steve Polito Date: Thu, 15 Dec 2022 06:36:08 -0500 Subject: [PATCH] Add test coverage --- spec/features/new_project_spec.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spec/features/new_project_spec.rb b/spec/features/new_project_spec.rb index 298f8a67c..1d4ebe914 100644 --- a/spec/features/new_project_spec.rb +++ b/spec/features/new_project_spec.rb @@ -272,6 +272,18 @@ def app_name expect(spec_helper).to match(/Timecop.safe_mode = true/) end + it "adds and configures a bundler strategy for css and js" do + gemfile = read_project_file("Gemfile") + + expect(gemfile).to match(/cssbundling-rails/) + expect(gemfile).to match(/jsbundling-rails/) + expect(File).to exist("#{project_path}/postcss.config.js") + expect(File).to exist("#{project_path}/package.json") + expect(File).to exist("#{project_path}/bin/dev") + expect(File).to exist("#{project_path}/app/assets/stylesheets/application.postcss.css") + expect(File).to exist("#{project_path}/app/javascript/application.js") + end + def development_config @_development_config ||= read_project_file %w[config environments development.rb]