File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,24 @@ class WebpackInstallerTest < ActiveSupport::TestCase
5
5
include RailsAppHelpers
6
6
include SharedInstallerTests
7
7
8
+ test "webpack installer" do
9
+ with_new_rails_app do
10
+ out , _err = run_installer
11
+
12
+ File . read ( "Procfile.dev" ) . tap do |procfile |
13
+ assert_match "js: yarn build --watch" , procfile
14
+ end
15
+
16
+ assert_match "STUBBED gem install foreman" , out
17
+
18
+ assert File . exist? ( "webpack.config.js" )
19
+
20
+ assert_match %r{STUBBED yarn add.* webpack} , out
21
+ assert_match %r{STUBBED npm (?:set-script build |pkg set scripts.build=)webpack --config webpack.config.js} , out
22
+ assert_match "STUBBED yarn build" , out
23
+ end
24
+ end
25
+
8
26
private
9
27
def run_installer
10
28
stub_bins ( "gem" , "yarn" , "npm" )
You can’t perform that action at this time.
0 commit comments