public
Description: Test against many versions of Rails with a single command.
Homepage: http://multi-rails.rubyforge.org/
Clone URL: git://github.com/relevance/multi_rails.git
multi_rails / .autotest
100755 23 lines (20 sloc) 0.667 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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