diff options
Diffstat (limited to 'spec/ruby/core/kernel/p_spec.rb')
| -rw-r--r-- | spec/ruby/core/kernel/p_spec.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/ruby/core/kernel/p_spec.rb b/spec/ruby/core/kernel/p_spec.rb index 798bd47b34..f89716899a 100644 --- a/spec/ruby/core/kernel/p_spec.rb +++ b/spec/ruby/core/kernel/p_spec.rb @@ -13,7 +13,7 @@ describe "Kernel#p" do end it "is a private method" do - Kernel.should have_private_instance_method(:p) + Kernel.private_instance_methods(false).should.include?(:p) end # TODO: fix @@ -57,10 +57,14 @@ describe "Kernel#p" do } -> { p(o) }.should output_to_fd("Next time, Gadget, NEXT TIME!\n") - $\ = " *helicopter sound*\n" + suppress_warning { + $\ = " *helicopter sound*\n" + } -> { p(o) }.should output_to_fd("Next time, Gadget, NEXT TIME!\n") - $/ = " *helicopter sound*\n" + suppress_warning { + $/ = " *helicopter sound*\n" + } -> { p(o) }.should output_to_fd("Next time, Gadget, NEXT TIME!\n") end @@ -72,10 +76,8 @@ describe "Kernel#p" do -> { p(*[]) }.should output("") end -=begin Not sure how to spec this, but wanted to note the behavior here - it "does not flush if receiver is not a TTY or a File" do - end -=end + # Not sure how to spec this, but wanted to note the behavior here + it "does not flush if receiver is not a TTY or a File" end describe "Kernel.p" do |
