[test] add spec for RM-541

This commit is contained in:
Watson
2014-09-02 14:48:33 +09:00
parent 33ba11c3bb
commit ba0b5b622b

View File

@@ -0,0 +1,21 @@
describe "Method" do
class TestMethodA
def foo
end
end
class TestMethodB < TestMethodA
def foo
end
end
class TestMethodC < TestMethodA
end
# RM-541
it "#owner should return correct owner if override the method in inherited class" do
TestMethodB.new.method(:foo).owner.should == TestMethodB
TestMethodC.new.method(:foo).owner.should == TestMethodA
end
end