Skip to content

Instantly share code, notes, and snippets.

@nofxx
Created October 5, 2008 09:55
Show Gist options
  • Save nofxx/14869 to your computer and use it in GitHub Desktop.
Save nofxx/14869 to your computer and use it in GitHub Desktop.
RSpec 1.1.8 autospec only works with this...
Autotest.add_hook :initialize do |at|
at.clear_mappings
at.add_mapping(%r{^spec/.+_spec\.rb$}) do |filename,_|
filename
end
at.add_mapping(%r{^lib/< project folder!! >/(.+)\.rb$}) do |_,match|
[ "spec/< project folder!!!! >/#{match[1]}_spec.rb" ] +
at.files_matching(%r{^spec/integration/.+_spec\.rb$})
end
at.add_mapping(%r{^spec/spec_helper\.rb$}) do
at.files_matching(%r{^spec/.+_spec\.rb$})
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment