使用Ruby:rbiphonetest 来处理iphone apps 应用的单元测试
星期二, 08月 19th, 2008Even if you’ve never touched Objective-C, Cocoa, the iPhone SDK, nor RubyCocoa I recommend watching the video anyway. It should give you hope that if you make the transition to iPhone development you don’t have to go alone without Ruby: your trusty swiss army knife of language/libraries/tools.
Unit Testing iPhone apps using Ruby from Dr Nic on Vimeo.
You cannot run RubyCocoa on an iPhone, but you can use it for your unit testing of your Objective-C classes. This tutorial shows you how to get started.
Project at github.com/drnic/rbiphonetest/
NOTE: the project has been renamed to ‘rbiphonetest’ and not ‘iphoneruby’ as in the video.
Installation and Usage
To summarize the video, but change ‘iphoneruby’ to ‘rbiphonetest’, you install the framework via RubyGems:
sudo gem install rbiphonetest
Then change to your project’s folder and install the test framework:
rbiphonetest .
Finally, for each generic, non-UIKit-framework-using class you want to test:
script/generate model WidgetModel
Then write your tests in test/test_widget_model.rb


