mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
[ruby/pp] [Feature #21389] Update rubyspec
This commit is contained in:
parent
674e2ca945
commit
ab49e8a0f0
Notes:
git
2025-10-05 12:00:47 +00:00
@ -3,7 +3,12 @@ require_relative '../../spec_helper'
|
||||
describe "Set#pretty_print_cycle" do
|
||||
it "passes the 'pretty print' representation of a self-referencing Set to the pretty print writer" do
|
||||
pp = mock("PrettyPrint")
|
||||
pp.should_receive(:text).with("#<Set: {...}>")
|
||||
ruby_version_is(""..."3.5") do
|
||||
pp.should_receive(:text).with("#<Set: {...}>")
|
||||
end
|
||||
ruby_version_is("3.5") do
|
||||
pp.should_receive(:text).with("Set[...]")
|
||||
end
|
||||
Set[1, 2, 3].pretty_print_cycle(pp)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user