Skip to content

Commit

Permalink
Add specs for Encoding#replicate
Browse files Browse the repository at this point in the history
  • Loading branch information
AI-Mozi committed May 25, 2023
1 parent d598249 commit e0ecd5c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/encoding/replicate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@
end
end

ruby_version_is "3.2" do
it "warns about deprecation" do
-> {
Encoding::US_ASCII.replicate('MY-US-ASCII')
}.should complain(/warning: Encoding#replicate is deprecated and will be removed in Ruby 3.3; use the original encoding instead/)
end
end

ruby_version_is "3.3" do
it "has been removed" do
Encoding::US_ASCII.should_not.respond_to?(:replicate, true)
Expand Down

0 comments on commit e0ecd5c

Please sign in to comment.