diff options
author | Willian Gustavo Veiga <beberveiga@gmail.com> | 2018-10-22 20:06:45 -0300 |
---|---|---|
committer | Willian Gustavo Veiga <beberveiga@gmail.com> | 2018-10-22 20:06:45 -0300 |
commit | 47ef6fd2ca596a7d47bac6b584d5eced46e0d4d8 (patch) | |
tree | 26d0a84a3cefd153b5315c37addb784e1b9228f3 /railties/test/generators/shared_generator_tests.rb | |
parent | c8ff9bd63a2371b6f0f0b4f48abf29cf89a1d397 (diff) | |
parent | e853acb9b4cfb5bb91a241cf37084631cd145823 (diff) | |
download | rails-47ef6fd2ca596a7d47bac6b584d5eced46e0d4d8.tar.gz rails-47ef6fd2ca596a7d47bac6b584d5eced46e0d4d8.tar.bz2 rails-47ef6fd2ca596a7d47bac6b584d5eced46e0d4d8.zip |
Merge branch 'master' into feature/reselect-method
Diffstat (limited to 'railties/test/generators/shared_generator_tests.rb')
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index fc654e867b..9b980bd52b 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -91,7 +91,7 @@ module SharedGeneratorTests template end - generator([destination_root], template: path).stub(:open, check_open, template) do + generator([destination_root], template: path, skip_webpack_install: true).stub(:open, check_open, template) do generator.stub :bundle_command, nil do quietly { assert_match(/It works!/, capture(:stdout) { generator.invoke_all }) } end @@ -99,7 +99,7 @@ module SharedGeneratorTests end def test_skip_gemfile - assert_not_called(generator([destination_root], skip_gemfile: true), :bundle_command) do + assert_not_called(generator([destination_root], skip_gemfile: true, skip_webpack_install: true), :bundle_command) do quietly { generator.invoke_all } assert_no_file "Gemfile" end @@ -231,7 +231,7 @@ module SharedGeneratorTests assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']active_storage\/engine["']/ assert_file "#{application_path}/app/javascript/packs/application.js" do |content| - assert_no_match(/^\/\/= require activestorage/, content) + assert_no_match(/activestorage/, content) end assert_file "#{application_path}/config/environments/development.rb" do |content| @@ -261,7 +261,7 @@ module SharedGeneratorTests assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']active_storage\/engine["']/ assert_file "#{application_path}/app/javascript/packs/application.js" do |content| - assert_no_match(/^import * as ActiveStorage from "activestorage"\nActiveStorage.start()/, content) + assert_no_match(/^import * as ActiveStorage from "activestorage"\nActiveStorage.start\(\)/, content) end assert_file "#{application_path}/config/environments/development.rb" do |content| @@ -339,11 +339,6 @@ module SharedGeneratorTests run_generator assert_file "#{application_path}/package.json", /dependencies/ assert_file "#{application_path}/config/initializers/assets.rb", /node_modules/ - - assert_file ".gitignore" do |content| - assert_match(/node_modules/, content) - assert_match(/yarn-error\.log/, content) - end end def test_generator_for_yarn_skipped @@ -354,10 +349,5 @@ module SharedGeneratorTests assert_file "#{application_path}/config/initializers/assets.rb" do |content| assert_no_match(/node_modules/, content) end - - assert_file ".gitignore" do |content| - assert_no_match(/node_modules/, content) - assert_no_match(/yarn-error\.log/, content) - end end end |