Sha256: 3769c529311dee5a825dee756f010da0a7099d8640a186f376384cfe18727ed8
Contents?: true
Size: 911 Bytes
Versions: 52
Compression:
Stored size: 911 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../fixtures/classes', __FILE__) describe "Method#name" do ruby_version_is '1.8.7'..'1.9' do it "returns the name of the method" do "abc".method(:upcase).name.should == "upcase" end it "returns the name even when aliased" do obj = MethodSpecs::Methods.new obj.method(:foo).name.should == "foo" obj.method(:bar).name.should == "bar" obj.method(:bar).unbind.bind(obj).name.should == "bar" end end ruby_version_is '1.9' do it "returns the name of the method" do "abc".method(:upcase).name.should == :upcase end it "returns the name even when aliased" do obj = MethodSpecs::Methods.new obj.method(:foo).name.should == :foo obj.method(:bar).name.should == :bar obj.method(:bar).unbind.bind(obj).name.should == :bar end end end
Version data entries
52 entries across 52 versions & 2 rubygems