Sha256: 56f9d69b350b734ecb49dbd8f494f3821d2d5dd6eaad5e4077c9b20c972843c4

Contents?: true

Size: 1.79 KB

Versions: 4

Compression:

Stored size: 1.79 KB

Contents

= autowatchr

Provides some autotest-like behavior for watchr (http://github.com/mynyml/watchr).

== Installation

  gem install autowatchr --source http://gemcutter.org

== Current features

* Auto-watches test and lib files using the autotest layout
* Optionally run only failing-tests
* Optionally run entire suite after all tests pass

== Todo

* Cucumber support
* Expose algorithm to map test classes to test files

== Example use

test.watchr
  require 'autowatchr'

  Autowatchr.new(self) do |config|
    config.ruby = 'jruby'
    config.lib_dir = 'leet_lib'
    config.test_dir = 'leet_test'
  end

=== Configuration options
* command
  * An ERB template for the command
  * Default: <tt>"<%= ruby %> -I<%= include %> <%= predicate %>"</tt>
* ruby
  * The ruby executable to use
  * Default: <tt>"ruby"</tt>
* include
  * Paths to include (with -I)
  * Default: <tt>".:#{self.lib_dir}:#{self.test_dir}"</tt>
* lib_dir
  * The lib path, where your library lives
  * Default: <tt>"lib"</tt>
* test_dir
  * The test path, where your tests live
  * Default: <tt>"test"</tt>
* lib_re
  * The regexp to use for discovering library files
  * Default: <tt>'^%s.*/.*\.rb$' % self.lib_dir</tt>
* test_re
  * The regexp to use for discovering library files
  * Default: <tt>'^%s.*/test_.*\.rb$' % self.test_dir</tt>
* failing_only
  * Run only failing tests the next time a test file is run
  * Default: <tt>true</tt>
* run_suite
  * Run entire test suite after failing tests pass
  * Default: <tt>true</tt>

All of the config options are optional.  You can also pass in a hash instead of a block. Also see: test.watchr[http://github.com/viking/autowatchr/blob/master/test.watchr].

== Copyright

Copyright (c) 2009 Jeremy Stephens. See LICENSE for details.

Many snippets were taken from ZenTest[http://github.com/seattlerb/ZenTest].

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
autowatchr-0.1.3 README.rdoc
autowatchr-0.1.2 README.rdoc
autowatchr-0.1.1 README.rdoc
autowatchr-0.1.0 README.rdoc