Skip to content

Commit 9e50dd2

Browse files
add a test on application layouts viewport meta tag
1 parent a244678 commit 9e50dd2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

railties/test/application/rake_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class Hello
182182
end
183183

184184
def test_code_statistics
185-
assert_match "Code LOC: 61 Test LOC: 3 Code to Test Ratio: 1:0.0",
185+
assert_match "Code LOC: 62 Test LOC: 3 Code to Test Ratio: 1:0.0",
186186
rails("stats")
187187
end
188188

railties/test/generators/app_generator_test.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,14 @@ def test_does_not_generate_system_test_files_if_skip_system_test_is_given
551551
end
552552
end
553553

554+
def test_viewport_meta_tag_is_present
555+
run_generator [destination_root]
556+
557+
assert_file "app/views/layouts/application.html.erb" do |contents|
558+
assert_match(/<meta name="viewport"/, contents)
559+
end
560+
end
561+
554562
def test_javascript_is_skipped_if_required
555563
run_generator [destination_root, "--skip-javascript"]
556564

0 commit comments

Comments
 (0)