diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-10-05 20:12:35 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-10-05 20:12:35 +0900 |
| commit | ab49e8a0f0d61ef38b4006d2e8f3976550ba23f8 (patch) | |
| tree | 2a98c859fa512a4b2906b09f6dc1037155a8f779 /spec/ruby | |
| parent | 674e2ca9452121a3e3066e04ecd51ba8d863cf2b (diff) | |
[ruby/pp] [Feature #21389] Update rubyspec
Diffstat (limited to 'spec/ruby')
| -rw-r--r-- | spec/ruby/core/set/pretty_print_cycle_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/ruby/core/set/pretty_print_cycle_spec.rb b/spec/ruby/core/set/pretty_print_cycle_spec.rb index c3b383fe80..d4cca515e2 100644 --- a/spec/ruby/core/set/pretty_print_cycle_spec.rb +++ b/spec/ruby/core/set/pretty_print_cycle_spec.rb @@ -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 |
