Skip to content

Commit

Permalink
Set-up autotest to run whenever a new binary is built
Browse files Browse the repository at this point in the history
This is made possible now thanks to the new "add_mapping" method in
ZenTest 3.8.0.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
  • Loading branch information
wincent committed Jan 30, 2008
1 parent 5217607 commit 92506b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .autotest
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Autotest.add_hook :initialize do |a|
all_specs = %r%^spec/.+_spec\.rb$%
a.add_mapping(%r%^ext/\.built$%) {
a.files_matching all_specs
}
a.add_mapping(%r%^\.autotest$%) {
a.files_matching all_specs
}
end
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end

file built_extension => extension_files do
Dir.chdir('ext') do
sh 'make'
sh 'make && touch .built'
end
end

Expand Down
1 change: 1 addition & 0 deletions ext/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Makefile
*.tokens
*.bundle
*.so
.built

0 comments on commit 92506b9

Please sign in to comment.