mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-21 02:50:14 +08:00
[test] add spec for RM-512
This commit is contained in:
@@ -4,6 +4,9 @@ class TestShortcut
|
||||
def setFoo(x)
|
||||
@foo = x
|
||||
end
|
||||
def setFoo1(x)
|
||||
@foo = x
|
||||
end
|
||||
end
|
||||
|
||||
describe "Shortcut method on RubyObject" do
|
||||
@@ -14,4 +17,12 @@ describe "Shortcut method on RubyObject" do
|
||||
obj.foo = 42
|
||||
obj.foo.should == 42
|
||||
end
|
||||
|
||||
it "should work even if method name has trailing number" do
|
||||
# RM-512
|
||||
obj = TestShortcut.new
|
||||
obj.respond_to?(:foo1=).should == true
|
||||
obj.foo1 = 42
|
||||
obj.foo.should == 42
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user