Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (20 sloc) 667 Bytes
require 'autotest'
$LOAD_PATH.unshift "test", "test/autotest"
# Make sure autotest groks our directory structure to map tests to files
p 'here!'
Autotest.add_hook :initialize do |at|
at.add_mapping(/^lib\/(.*)\.rb$/) { |filename, m|
file = File.basename(filename).gsub("_", "_?").gsub(".rb", "")
foo = at.files_matching %r%^test/.*#{file}_test.rb$%
foo
}
at.add_mapping(/^test\/.*_test\.rb$/) { |filename, _|
filename
}
#
#
# at.add_mapping(%r%^plugins/acts_as_currency/lib/.*\.rb$%) {
# at.files_matching %r%^spec/models/product_spec\.rb$% +
# at.files_matching %r%^plugins/acts_as_currency/spec/.*_spec\.rb$%
# }
end