File tree 2 files changed +28
-0
lines changed
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 22
22
sss_meth . receiver . should == obj
23
23
sss_meth . name . should == :overridden
24
24
end
25
+
26
+ it "returns nil when there's no super method in the parent" do
27
+ method = Object . new . method ( :method )
28
+ method . super_method . should == nil
29
+ end
30
+
31
+ it "returns nil when the parent's method is removed" do
32
+ object = MethodSpecs ::B . new
33
+ method = object . method ( :overridden )
34
+
35
+ MethodSpecs ::A . class_eval { undef :overridden }
36
+
37
+ method . super_method . should == nil
38
+ end
25
39
end
Original file line number Diff line number Diff line change 9
9
meth = meth . super_method
10
10
meth . should == UnboundMethodSpecs ::A . instance_method ( :overridden )
11
11
end
12
+
13
+ it "returns nil when there's no super method in the parent" do
14
+ method = Object . instance_method ( :method )
15
+ method . super_method . should == nil
16
+ end
17
+
18
+ it "returns nil when the parent's method is removed" do
19
+ object = UnboundMethodSpecs ::B
20
+ method = object . instance_method ( :overridden )
21
+
22
+ UnboundMethodSpecs ::A . class_eval { undef :overridden }
23
+
24
+ method . super_method . should == nil
25
+ end
12
26
end
You can’t perform that action at this time.
0 commit comments