Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 100 lines (62 sloc) 3.292 kB
57e192e @billhorsman First working copy that's useful.
authored
1 TestOwl
2 =
3
1b5d6f5 @billhorsman Shameless image homage to ascii
authored
4 ![TestOwl](https://github.com/billhorsman/testowl/raw/master/images/testowl.png)
57e192e @billhorsman First working copy that's useful.
authored
5
8c3cc55 @billhorsman Ascii art attempt (work with Markdown?)
authored
6 Narrow Minded TestUnit/RSpec, Watchr and Growl Integration for Continuous Testing. TestOwl assumes you are running Rails and makes some guesses about what tests depend on what files. For instance, if you change model Foo then it looks for foo_test.rb and foos_controller_test.rb.
7
57e192e @billhorsman First working copy that's useful.
authored
8 At the very least, it will run each test every time you save it.
9
10 Usage
11 ==
12
13 From Rails root:
14
15 testowl
16
0035a0e @billhorsman Update README
authored
17 If you're using [bundler](http://gembundler.com/) then you should probably run:
57e192e @billhorsman First working copy that's useful.
authored
18
19 bundle exec testowl
20
21 Dependencies
22 ==
23
a00e1ca @billhorsman Change README for growlnotifier.
authored
24 It uses [growlnotifiy](http://growl.info/extras.php) to send messages to Growl. If you don't have it installed then it will only write a message to your terminal. To get the full benefit of TestOwl you should definitely install growlnotify.
57e192e @billhorsman First working copy that's useful.
authored
25
9a1a52c @billhorsman Add to README
authored
26 Bundler
27 ==
28
29 To install using Bundler:
30
31 group :test do
32 gem 'testowl', :git => "git@github.com:billhorsman/testowl.git"
33 end
57e192e @billhorsman First working copy that's useful.
authored
34
c19caf4 @billhorsman Add RSpec support!
authored
35 RSpec
36 ==
37
0035a0e @billhorsman Update README
authored
38 TestOwl looks for <code>spec/spec_helper.rb</code> and if it finds it then it uses [RSpec](http://relishapp.com/rspec).
c19caf4 @billhorsman Add RSpec support!
authored
39
57e192e @billhorsman First working copy that's useful.
authored
40 Test Unit
41 ==
42
0035a0e @billhorsman Update README
authored
43 TestOwl looks for <code>test/test_helper.rb</code> and if it finds it then it uses Test Unit. Actually, it looks for RSpec first and only checks for Test Unit if it can't find RSpec.
57e192e @billhorsman First working copy that's useful.
authored
44
45 Spork
46 ==
47
0035a0e @billhorsman Update README
authored
48 [Spork](https://github.com/timcharper/spork) is a testing framework for RSpec and Cucumber (see below for use with Test Unit) that forks before each run to ensure a clean testing state. By preloading the Rails environment it speeds up the launch time to run tests. This is especially significant when running single, small tests.
57e192e @billhorsman First working copy that's useful.
authored
49
50 If you are running Spork then it will use it (assuming it is on port 8988) but if it gets no response on that port then it will just run the tests directly.
51
0035a0e @billhorsman Update README
authored
52 To get it running you just:
53
54 $ bundle exec spork
55 Using TestUnit
56 Preloading Rails environment
57 Loading Spork.prefork block...
58 Spork is ready and listening on 8988!
59
60 Spork with RSpec
61 ==
62
63 You need to tell RSpec to use Spork by running it with the <code>--drb</code> option. If you want to do that every time then you can add a file called <code>.rspec</code> to your project:
64
65 --drb
66
67 If Spork isn't running then RSpec will just run the specs directly.
68
69 Tip: if you prefer full output instead of just dots then you can use <code>-f d</code> and I always like some color too. My .rspec looks like this:
70
71 -f d --color --drb
72
73 Spork with Test Unit
74 ==
75
9a1a52c @billhorsman Add to README
authored
76 Spork doesn't support Test Unit out of the box, but it does if you include the [spork-testunit](https://github.com/timcharper/spork-testunit) gem. This is what your Gemfile might look like
77
78 group :test do
79 gem 'spork', "~> 0.9.0.rc"
80 gem 'spork-testunit', :git => 'git://github.com/timcharper/spork-testunit.git'
81 gem 'testowl', :git => "git@github.com:billhorsman/testowl.git"
82 end
83
0035a0e @billhorsman Update README
authored
84 To use Spork you then have to run your tests like this:
9a1a52c @billhorsman Add to README
authored
85
0035a0e @billhorsman Update README
authored
86 testdrb test/unit/foo_test.rb
87
88 TestOwl does that for you.
9a1a52c @billhorsman Add to README
authored
89
57e192e @billhorsman First working copy that's useful.
authored
90 Todo
91 ==
92
93 * Make Drb port configurable
9a1a52c @billhorsman Add to README
authored
94 * DSL to define relationship between changed files and tests to run.
95 * Add some more rules for relationships (with or without DSL)
57e192e @billhorsman First working copy that's useful.
authored
96
97 Credits
98 ==
99
9a1a52c @billhorsman Add to README
authored
100 Copyright (c) 2011 [Bill Horsman](http://bill.logicalcobwebs.com), released under the MIT license.
Something went wrong with that request. Please try again.