No commit activity in last 3 years
No release in over 3 years
Xctool test guard allows you to automically & intelligently aunch specs when files are modified. This gem use xctool to build and run tests, and xcodeproj gem to parse project file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0

Runtime

 Project Readme

guard-xctool-test

guard-xctool-test allows you to automically & intelligently launch specs when files are modified.

Installation

Add this line to your application's Gemfile:

gem 'guard-xctool-test'

And then execute:

$ bundle

Or install it yourself as:

$ gem install guard-xctool-test

Dependency

Guardfile

guard 'xctool-test' do
  watch(%r{YourApp/(.+)\.(m|mm)$})
  watch(%r{YourAppTests/(.+)\.(m|mm)$})
end

How to Use

Make sure you installed xctool, and add appropriate .xctool-args to your project root before using guard-xctool-test. Alternatively you may specify appropriate :cli option.

Options

By default, xctool-test find the folder for projects and find a target that look like test. You can supply your target by using test_target option.

guard 'xctool-test', :test_target => 'YourAppTests' do
  watch(%r{YourApp/(.+)\.(m|mm)$})
  watch(%r{YourAppTests/(.+)\.(m|mm)$})
end

By default, xctool-test check all files under current folder for tests. You can specify a specific folder, or array of folders, as test path.

guard 'xctool-test', :test_paths => 'YourAppTests' do
  watch(%r{YourApp/(.+)\.(m|mm)$})
  watch(%r{YourAppTests/(.+)\.(m|mm)$})
end
guard 'xctool-test', :test_paths => ['YourAppUITests', 'YourAppTests'] do
  watch(%r{YourApp/(.+)\.(m|mm)$})
  watch(%r{YourAppTests/(.+)\.(m|mm)$})
end

You can pass any of the standard xctool CLI options using the :cli option:

guard 'xctool-test', :cli => '-workspace A.workspace' do
  watch(%r{YourApp/(.+)\.(m|mm)$})
  watch(%r{YourAppTests/(.+)\.(m|mm)$})
end

You might specify the full path to the xctool with :xctool option:

guard 'xctool-test', :xctool => '/usr/local/bin/xctool' do
  watch(%r{YourApp/(.+)\.(m|mm)$})
  watch(%r{YourAppTests/(.+)\.(m|mm)$})
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request