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
55  include  RailsAppHelpers 
66  include  SharedInstallerTests 
77
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  "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+ 
826  private 
927    def  run_installer 
1028      stub_bins ( "gem" ,  "yarn" ,  "npm" ) 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments