Yep, use `[`expect_warning_with(__FILE__, __LINE__ + 1, /because the object was frozen/)`](/rspec/rspec-support/blob/master/lib/rspec/support/spec/deprecation_helpers.rb).`