Skip to content
Guard::Motion automatically run your RubyMotion specs (much like autotest)
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.travis.yml bump to version 0.1.2 May 23, 2013
Gemfile version 0.1.0 Aug 10, 2012
guard-motion.gemspec PTY-based spec runner Sep 11, 2012

Guard::Motion Build Status

Motion guard allows to automatically & intelligently launch RubyMotion specs when files are modified.


Please be sure to have Guard installed before continue.

Install the gem:

$ gem install guard-motion

Add it to your Gemfile (inside development group):

gem 'guard-motion'

Add guard definition to your Guardfile by running this command:

$ guard init motion

Make sure Guard::Motion is loaded in your project Rakefile:

require 'guard/motion'


Please read Guard usage doc


Motion guard can be really adapted to all kind of project setup.

Typical RubyMotion App

guard 'motion' do
  watch(%r{^app/(.+)\.rb$})     { |m| "spec/#{m[1]}_spec.rb" }

Typical RubyMotion library

guard 'motion' do
  watch(%r{^lib/[^/]+/(.+)\.rb$})     { |m| "spec/#{m[1]}_spec.rb" }

Please read Guard doc for more information about the Guardfile DSL.


By default, Guard::Motion will only look for spec files within spec in your project root. You can configure Guard::Motion to look in additional paths by using the :spec_paths option:

guard 'motion', :spec_paths => ["spec", "vendor/other_project/spec"] do
  # ...

If you have only one path to look, you can configure :spec_paths option with a string:

guard 'motion', :spec_paths => "test" do
  # ...

List of available options:

:bundler => false                 # use "bundle exec" to run the rake command, default: true
:binstubs => true                 # use "bin/rake" to run the rake command (takes precedence over :bundle), default: false
:env => {:output => 'test_unit'}  # set env variables to be used by the RubyMotion spec runner, default: {}
:notification => false            # display Growl (or Libnotify) notification after the specs are done running, default: true
:all_after_pass => false          # run all specs after changed specs pass, default: true
:all_on_start => false            # run all the specs at startup, default: true
:keep_failed => false             # keep failed specs until they pass, default: true
:spec_paths => ["spec"]           # specify an array of paths that contain spec files

You can also use a custom binstubs directory using :binstubs => 'some-dir'.


Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

Something went wrong with that request. Please try again.