From 8c1c37b4fcfbf5acf06d749c1ea44b4fa4557782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Leal=20Cardoso=20Junior?= Date: Tue, 30 Dec 2025 17:14:30 -0300 Subject: [PATCH] chore(ci): add ruby 4.0 to the matrix --- .github/workflows/ci.yml | 14 +++++++++++--- spec/encapsulated_helper_spec.rb | 12 ++++++++---- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b31a66b..3c809a44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,14 +6,14 @@ jobs: test: strategy: matrix: - ruby: ["3.5.0-preview1", "3.4", "3.3", "3.2", "3.1", "3.0", "2.7"] - rails: ["8.0", "7.2", "7.1", "6.1"] + ruby: ["4.0", "3.4", "3.3", "3.2", "3.1", "3.0", "2.7"] + rails: ["8.1", "8.0", "7.2", "7.1", "6.1"] exclude: - rails: "6.1" ruby: "3.4" - rails: "6.1" - ruby: "3.5.0-preview1" + ruby: "4.0" - rails: "7.2" ruby: "2.7" @@ -26,6 +26,14 @@ jobs: ruby: "3.0" - rails: "8.0" ruby: "3.1" + + - rails: "8.1" + ruby: "2.7" + - rails: "8.1" + ruby: "3.0" + - rails: "8.1" + ruby: "3.1" + runs-on: ubuntu-latest services: diff --git a/spec/encapsulated_helper_spec.rb b/spec/encapsulated_helper_spec.rb index c44b2d62..41dfc7dc 100644 --- a/spec/encapsulated_helper_spec.rb +++ b/spec/encapsulated_helper_spec.rb @@ -18,11 +18,15 @@ context "inside a view" do it "works inside ERB" do require "erb" - template = ERB.new(<<-ERB.split(/\s+/s).map(&:strip).join(" "), nil, "%") - foo <% context_shim.ab_test(:foo, '1', '2') do |alt, meta| %> - static <%= alt %> - <% end %> + + html = <<-ERB.split(/\s+/s).map(&:strip).join(" ") + foo <% context_shim.ab_test(:foo, '1', '2') do |alt, meta| %> + static <%= alt %> + <% end %> ERB + + template = ERB.new(html, trim_mode: "%") + expect(template.result(binding)).to match(/foo static \d/) end end