Skip to content

Commit

Permalink
Fix specs for Ruby 3.2
Browse files Browse the repository at this point in the history
Since `Object#=~` has been removed in Ruby 3.2, the following code
raises NoMethodError when `asset` provided as `Hash`.
https://github.com/seanpdoyle/ember-cli-rails-assets/blob/v0.7.0/lib/ember_cli/assets/asset_map.rb#L36

Ref: https://bugs.ruby-lang.org/issues/15231

This spec should be updated with empty value as `nil` due to type consistency.
  • Loading branch information
tricknotes committed Feb 15, 2023
1 parent e3200f5 commit bd9adba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/lib/ember_cli/assets/asset_map_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
it "includes the most recent javascript build artifacts" do
asset_map = {
"assets" => {
"not-a-match" => {},
"not-a-match" => nil,
"bar.js" => "bar-abc123.js",
"vendor.js" => "vendor-abc123.js",
},
Expand Down Expand Up @@ -42,7 +42,7 @@
it "includes the most recent stylesheet build artifacts" do
asset_map = {
"assets" => {
"not-a-match" => {},
"not-a-match" => nil,
"bar.css" => "bar-abc123.css",
"vendor.css" => "vendor-abc123.css",
},
Expand Down

0 comments on commit bd9adba

Please sign in to comment.