Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x] CI fixes #3106

Merged
merged 3 commits into from Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/ruby.yml
Expand Up @@ -29,14 +29,6 @@ jobs:
gemfile: gemfiles/Gemfile-rails.6.0.x
experimental: [false]
include:
- ruby: 2.5
os: ubuntu-latest
gemfile: gemfiles/Gemfile-rails-edge
experimental: true
- ruby: 2.6
os: ubuntu-latest
gemfile: gemfiles/Gemfile-rails-edge
experimental: true
- ruby: 2.7
os: ubuntu-latest
gemfile: gemfiles/Gemfile-rails-edge
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/Gemfile-rails-edge
Expand Up @@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }

gemspec path: "../"

gem "rails", github: "rails/rails"
gem "rails", github: "rails/rails", branch: "main"
gem "arel", github: "rails/arel"
gem "rake", ">= 11.1"
gem "rack-proxy", require: false
Expand Down
30 changes: 21 additions & 9 deletions test/helper_test.rb
Expand Up @@ -117,29 +117,41 @@ def test_preload_pack_asset
end

def test_stylesheet_pack_tag_split_chunks
assert_equal \
%(<link rel="stylesheet" media="screen" href="/packs/1-c20632e7baf2c81200d3.chunk.css" />\n) +
assert_equal stylesheet_packs_with_chunks_tag("application", "hello_stimulus").in?([
%(<link rel="stylesheet" href="/packs/1-c20632e7baf2c81200d3.chunk.css" media="screen" />\n) +
%(<link rel="stylesheet" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" media="screen" />\n) +
%(<link rel="stylesheet" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" media="screen" />),

%(<link rel="stylesheet" media="screen" href="/packs/1-c20632e7baf2c81200d3.chunk.css" />\n) +
%(<link rel="stylesheet" media="screen" href="/packs/application-k344a6d59eef8632c9d1.chunk.css" />\n) +
%(<link rel="stylesheet" media="screen" href="/packs/hello_stimulus-k344a6d59eef8632c9d1.chunk.css" />),
stylesheet_packs_with_chunks_tag("application", "hello_stimulus")
]),
true
end

def test_stylesheet_pack_tag
assert_equal \
assert_equal stylesheet_pack_tag("bootstrap.css").in?([
%(<link rel="stylesheet" href="/packs/bootstrap-c38deda30895059837cf.css" media="screen" />),

%(<link rel="stylesheet" media="screen" href="/packs/bootstrap-c38deda30895059837cf.css" />),
stylesheet_pack_tag("bootstrap.css")
]), true
end

def test_stylesheet_pack_tag_symbol
assert_equal \
assert_equal stylesheet_pack_tag(:bootstrap).in?([
%(<link rel="stylesheet" href="/packs/bootstrap-c38deda30895059837cf.css" media="screen" />),

%(<link rel="stylesheet" media="screen" href="/packs/bootstrap-c38deda30895059837cf.css" />),
stylesheet_pack_tag(:bootstrap)
]), true
end

def test_stylesheet_pack_tag_splat
assert_equal \
assert_equal stylesheet_pack_tag("bootstrap.css", "application.css", media: "all").in?([
%(<link rel="stylesheet" href="/packs/bootstrap-c38deda30895059837cf.css" media="all" />\n) +
%(<link rel="stylesheet" href="/packs/application-dd6b1cd38bfa093df600.css" media="all" />),

%(<link rel="stylesheet" media="all" href="/packs/bootstrap-c38deda30895059837cf.css" />\n) +
%(<link rel="stylesheet" media="all" href="/packs/application-dd6b1cd38bfa093df600.css" />),
stylesheet_pack_tag("bootstrap.css", "application.css", media: "all")
]), true
end
end