Take the 2008 Git User's Survey and help out! [ hide ]

public
Description: Want to write iPhone apps with unit tests? Want to write them in Ruby?
Homepage: http://groups.google.com/group/rbiphonetest
Clone URL: git://github.com/drnic/rbiphonetest.git
Search Repo:
name age message
folder .gitignore Sat Jun 28 06:22:19 -0700 2008 initial commit; with app generator [drnic]
folder History.txt Tue Jul 08 04:40:18 -0700 2008 app generator: adds selected test framework to ... [drnic]
folder License.txt Sat Jun 28 07:01:24 -0700 2008 updated README [drnic]
folder Manifest.txt Sat Jul 05 06:31:02 -0700 2008 fix manifest [drnic]
folder PostInstall.txt Wed Jul 02 18:19:34 -0700 2008 Renamed project from 'iphoneruby' to 'rbiphonet... [drnic]
folder README.rdoc Thu Jul 03 12:28:37 -0700 2008 updated URLs to info + lighthouse [drnic]
folder Rakefile Sat Jun 28 06:22:19 -0700 2008 initial commit; with app generator [drnic]
folder app_generators/ Tue Jul 08 04:40:18 -0700 2008 app generator: adds selected test framework to ... [drnic]
folder bin/ Sat Jul 05 06:29:54 -0700 2008 Support for test/unit AND rspec test frameworks... [drnic]
folder config/ Wed Jul 02 18:19:34 -0700 2008 Renamed project from 'iphoneruby' to 'rbiphonet... [drnic]
folder lib/ Sat Jul 05 06:29:54 -0700 2008 Support for test/unit AND rspec test frameworks... [drnic]
folder rbiphonetest_generators/ Sat Jul 05 06:29:54 -0700 2008 Support for test/unit AND rspec test frameworks... [drnic]
folder script/ Wed Jul 02 18:19:34 -0700 2008 Renamed project from 'iphoneruby' to 'rbiphonet... [drnic]
folder setup.rb Sat Jun 28 06:22:19 -0700 2008 initial commit; with app generator [drnic]
folder tasks/ Sat Jun 28 06:22:19 -0700 2008 initial commit; with app generator [drnic]
folder test/ Mon Aug 18 20:35:32 -0700 2008 fixed test 'spec' folder should be created not ... [drnic]
README.rdoc

rbiphonetest - Unit Test iPhone apps with Ruby

  • http://rbiphonetest.rubyforge.org

DESCRIPTION:

Want to write iPhone apps with unit tests? Want to write them in Ruby?

  • Blog introduction: http://drnicwilliams.com/2008/07/04/unit-testing-iphone-apps-with-ruby-rbiphonetest/
  • Video introduction: http://www.vimeo.com/1262916
  • Google Group: http://groups.google.com/group/rbiphonetest
  • Bugs/Features: http://drnic.lighthouseapp.com/projects/13763-rbiphonetest

FEATURES/PROBLEMS:

  • Installs a Ruby-based unit testing framework into an iPhone/Objective-C/Xcode project
  • Provides generators to create Objective-C classes with associated Ruby tests
  • Uses RubyCocoa to bridge between Ruby tests and Objective-C via Loadable Bundles

Known issues:

  • Currently only test/unit tests created; rspec etc coming soon
  • Currently only supports Foundation framework, since its common between OS X and iPhone
  • The plan is to mock out all the UIKit.framework classes so they can exist in RubyCocoa land.
  • MacRuby (instead of RubyCocoa) is not yet tested

SYNOPSIS:

  • Create a new iPhone project using Xcode templates
  • Open the terminal
  • Change to project folder
  • `rbiphonetest .`

This adds the test framework, a Rakefile, and an `autotest` config file.

You can now create testable Objective-C models/classes using the generator:

        $ script/generate model WidgetMaker
                  create  Classes/WidgetMaker.h
                  create  Classes/WidgetMaker.m
                  create  test/test_widget_maker.rb

To run tests you have several options:

  1. `rake` or `rake test`
  2. `autotest` (after installing the ZenTest gem)

All options will re-build the Objective-C code (if necessary) before running the tests.

If using autotest, your tests will be re-run if the test files or the Objective-C files are modified.

REQUIREMENTS:

  • RubyCocoa (installed on OS X Leopard; latest version at http://rubycocoa.com)
  • XCode 3.1 (containing the iPhone SDK)

INSTALL:

        sudo gem install rbiphonetest

From source:

        git clone git://github.com/drnic/rbiphonetest.git
        cd rbiphonetest
        rake install_gem

LICENSE:

(The MIT License)

Copyright © 2008 Dr Nic Williams

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.