[test] add spec for RM-276

This commit is contained in:
Watson
2014-05-18 21:27:15 +09:00
parent 7875e6cace
commit 0e2a616e4f

View File

@@ -6,6 +6,10 @@ class Base
obj.bar(args)
end
end
def func(x, a:y, b:z)
12345
end
end
class Foo < Base
@@ -13,6 +17,10 @@ class Foo < Base
$spec_result << "a"
super
end
def func(x, a:y, b:z)
super(x, a:y, b:z)
end
end
class B < (defined?(UIView) ? UIView : NSView)
@@ -45,4 +53,9 @@ describe "'super'" do
c.frame.origin.x.should == 42
end
it "should call the method even if passed keyword argument" do
# RM-276
obj = Foo.new
obj.func(1, a:2, b:3).should == 12345
end
end