Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RubyMotion 1.15で追加されたtest周りの話

pochi
July 24, 2012

RubyMotion 1.15で追加されたtest周りの話

第一回RubyMotion 勉強会で話した資料
その他RubyMotion系の解説記事は http://pchw.github.io/blog/categories/rubymotion/ へどうぞ

pochi

July 24, 2012
Tweet

More Decks by pochi

Other Decks in Programming

Transcript

  1. ࣗಈԽग़དྷΔૢ࡞ view event tap flick pinch drag rotate device event

    rotate acceleration shake 12೥7݄25೔ਫ༵೔
  2. ४උ(app/app_delegate.rb) class AppDelegate def application(application, didFinishLaunchingWithOptions:launchOptions) return true if RUBYMOTION_ENV

    == 'test' not for full application acceptance tests. Therefore you should not let the application launch as normal. 12೥7݄25೔ਫ༵೔
  3. viewͷࢦఆ describe ‘controlelr has label’ do tests Hoge it ‘has

    label’ do view(‘hoge’).should.not == nil end end class Hoge < UIViewController def viewDidLoad label = UILabel.alloc.init label.accessibilityLabel = “hoge” end end 12೥7݄25೔ਫ༵೔
  4. reference Writing Test for RubyMotion Appsʢެࣜʣ http://www.rubymotion.com/developer-center/articles/testing/ Functional View and

    Controller Testing with RubyMotionʢެࣜBlogʣ http://blog.rubymotion.com/post/26489000626/functional-view-and-controller-testing-with-rubymotion HipByte / RubyMotionʢtest/bacon-ui/spec಺ʹTest Sample͕͋Γ·͢ʣ https://github.com/HipByte/RubyMotion rm-redgreen https://github.com/mdks/rm-redgreen 12೥7݄25೔ਫ༵೔