diff options
Diffstat (limited to 'spec/ruby/core/kernel/format_spec.rb')
| -rw-r--r-- | spec/ruby/core/kernel/format_spec.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/ruby/core/kernel/format_spec.rb b/spec/ruby/core/kernel/format_spec.rb index c73d5f0efb..a311f3c3d7 100644 --- a/spec/ruby/core/kernel/format_spec.rb +++ b/spec/ruby/core/kernel/format_spec.rb @@ -1,14 +1,13 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../fixtures/classes', __FILE__) +require_relative '../../spec_helper' describe "Kernel#format" do - it "is a private method" do - Kernel.should have_private_instance_method(:format) + it "is an alias of Kernel#sprintf" do + Kernel.instance_method(:format).should == Kernel.instance_method(:sprintf) end end describe "Kernel.format" do - it "is accessible as a module function" do - Kernel.format("%s", "hello").should == "hello" + it "is an alias of Kernel.sprintf" do + Kernel.method(:format).should == Kernel.method(:sprintf) end end |
