Skip to content

Commit

Permalink
Add more support for ruby 3.4 in tests (#3260)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhawksley authored Jan 10, 2025
1 parent 9f87ab1 commit 87b0ddb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/great-students-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Add more support for ruby 3.4 in tests
4 changes: 2 additions & 2 deletions test/performance/bench_octicons.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setup
def bench_allocations_without_cache
Primer::Beta::Octicon.new(**@options)
Primer::Octicon::Cache.clear!
assert_allocations "3.3" => 26, "3.2" => 26, "3.1" => 27, "3.0" => 27 do
assert_allocations "3.4" => 25, "3.3" => 26, "3.2" => 26, "3.1" => 27, "3.0" => 27 do
Primer::Beta::Octicon.new(**@options)
end
ensure
Expand All @@ -26,7 +26,7 @@ def bench_allocations_without_cache

def bench_allocations_with_cache
Primer::Octicon::Cache.preload!
assert_allocations "3.3" => 10, "3.2" => 10, "3.1" => 10, "3.0" => 10 do
assert_allocations "3.4" => 9, "3.3" => 10, "3.2" => 10, "3.1" => 10, "3.0" => 10 do
Primer::Beta::Octicon.new(**@options)
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/performance/bench_utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def bench_allocations_supported_selector
# warm up
Primer::Classify::Utilities.supported_selector?("m-1")

assert_allocations "3.0" => 4, "3.1" => 4, "3.2" => 4, "3.3" => 4 do
assert_allocations "3.0" => 4, "3.1" => 4, "3.2" => 4, "3.3" => 4, "3.4" => 4 do
Primer::Classify::Utilities.supported_selector?("m-1")
end
end
Expand All @@ -21,7 +21,7 @@ def bench_allocations_non_supported_selector
# warm up
Primer::Classify::Utilities.supported_selector?("foo")

assert_allocations "3.0" => 0, "3.1" => 0, "3.2" => 0, "3.3" => 0 do
assert_allocations "3.0" => 0, "3.1" => 0, "3.2" => 0, "3.3" => 0, "3.4" => 0 do
Primer::Classify::Utilities.supported_selector?("foo")
end
end
Expand Down

0 comments on commit 87b0ddb

Please sign in to comment.