sam / dm-core

DataMapper - Core

Adam French (author)
Tue May 27 00:06:49 -0700 2008
commit  4f3e224b8d978a40d04e4bd7c1c2325c9ae1aead
tree    215dee9c98708d1e9fbf2fd9eef268ab21d36372
parent  58c07c87c19dc8946926f71b25d2203d383ac347
dm-core / .autotest
100644 27 lines (20 sloc) 0.676 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Autotest.add_hook :initialize do |at|
  ignore = %w[ .git burn www log plugins script tasks bin CHANGELOG FAQ MIT-LICENSE PERFORMANCE QUICKLINKS README ]
 
  unless ENV['AUTOTEST'] == 'integration'
    ignore << 'spec/integration'
  end
 
  ignore.each do |exception|
    at.add_exception(exception)
  end
 
  at.clear_mappings
 
  at.add_mapping(%r{^spec/.+_spec\.rb$}) do |filename,_|
    filename
  end
 
  at.add_mapping(%r{^lib/data_mapper/(.+)\.rb$}) do |_,match|
    [ "spec/unit/#{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