Skip to content

Commit

Permalink
Guard against silence being removed
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed May 29, 2023
1 parent 1caeb71 commit a3610ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ def have_deprecation(msg)
end

def ignore_deprecation
ActiveSupport::Deprecation.silence { yield }
if ActiveSupport::Deprecation.respond_to?(:silence)
ActiveSupport::Deprecation.silence { yield }
else
yield
end
end
}

Expand Down

0 comments on commit a3610ef

Please sign in to comment.