mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-05-19 12:22:27 +08:00
[test] add spec for RM-276
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user