Skip to content

Instantly share code, notes, and snippets.

@gabehollombe
Created March 25, 2011 00:01
Show Gist options
  • Save gabehollombe/886128 to your computer and use it in GitHub Desktop.
Save gabehollombe/886128 to your computer and use it in GitHub Desktop.
Get autotest to run on spec/integration changes and friends
Autotest.add_hook :initialize do |at|
at.add_mapping(%r%^spec/integration/.*_spec.rb$%, true) { |filename, _|
filename
}
at.add_mapping(%r%^app/(models|controllers|helpers|lib)/.*rb$%, true) {
at.files_matching %r%^spec/integration/.*_spec.rb$%
}
at.add_mapping(%r%^app/views/(.*)$%, true) {
at.files_matching %r%^spec/integration/.*_spec.rb$%
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment