mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 09:31:20 +08:00
[test] add test for RM-455
This commit is contained in:
17
test/test/spec/shortcut_spec.rb
Normal file
17
test/test/spec/shortcut_spec.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class TestShortcut
|
||||
attr_reader :foo
|
||||
|
||||
def setFoo(x)
|
||||
@foo = x
|
||||
end
|
||||
end
|
||||
|
||||
describe "Shortcut method on RubyObject" do
|
||||
it "should work" do
|
||||
# RM-455
|
||||
obj = TestShortcut.new
|
||||
obj.respond_to?(:foo=).should == true
|
||||
obj.foo = 42
|
||||
obj.foo.should == 42
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user