aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJavan Makhmali <javan@javan.us>2019-01-16 17:09:53 -0500
committerGitHub <noreply@github.com>2019-01-16 17:09:53 -0500
commita5fee7d531c06176ecc8815f52d9d54050c274ce (patch)
tree11631db8b66c8d7d272dda11c715aeb253eb2ecc /railties/test
parent90536ebfb3f0ca6971bc3ea4e43f20b8e977539b (diff)
parent385d31d209a957946378307e50aa739ccfadfea1 (diff)
downloadrails-a5fee7d531c06176ecc8815f52d9d54050c274ce.tar.gz
rails-a5fee7d531c06176ecc8815f52d9d54050c274ce.tar.bz2
rails-a5fee7d531c06176ecc8815f52d9d54050c274ce.zip
Merge pull request #34949 from javan/js/compact-start
Minimize boilerplate setup code for JavaScript libraries
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/rake_test.rb2
-rw-r--r--railties/test/generators/shared_generator_tests.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb
index 44e3b0f66b..830c36671c 100644
--- a/railties/test/application/rake_test.rb
+++ b/railties/test/application/rake_test.rb
@@ -118,7 +118,7 @@ module ApplicationTests
end
def test_code_statistics_sanity
- assert_match "Code LOC: 32 Test LOC: 0 Code to Test Ratio: 1:0.0",
+ assert_match "Code LOC: 29 Test LOC: 0 Code to Test Ratio: 1:0.0",
rails("stats")
end
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb
index f673832caa..26ce487c5f 100644
--- a/railties/test/generators/shared_generator_tests.rb
+++ b/railties/test/generators/shared_generator_tests.rb
@@ -206,7 +206,7 @@ module SharedGeneratorTests
unless generator_class.name == "Rails::Generators::PluginGenerator"
assert_file "#{application_path}/app/javascript/packs/application.js" do |content|
- assert_match(/^import \* as ActiveStorage from "@rails\/activestorage"\nActiveStorage.start\(\)/, content)
+ assert_match(/^require\("@rails\/activestorage"\)\.start\(\)/, content)
end
end
@@ -267,7 +267,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 "@rails\/activestorage"\nActiveStorage.start\(\)/, content)
+ assert_no_match(/^require\("@rails\/activestorage"\)\.start\(\)/, content)
end
assert_file "#{application_path}/config/environments/development.rb" do |content|