forked from datamapper/dm-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.autotest
29 lines (23 loc) · 968 Bytes
/
.autotest
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
28
29
Autotest.add_hook :initialize do |at|
%w[ .git log script tasks LICENSE README.rdoc ].each do |exception|
at.add_exception(exception)
end
at.clear_mappings
spec_folders = /(?:semi)?public/
# when a file is updated, make sure it's dependent public and semipublic specs pass
at.add_mapping %r{\Alib/dm\-core/(.+)\.rb\z} do |_,match|
at.files_matching %r{\Aspec/#{spec_folders}/#{match[1]}_spec\.rb\z}
end
# when the spec configuration changes make sure all specs pass
at.add_mapping %r{\Aspec/spec_helper\.rb\z} do
at.files_matching %r{\Aspec/.+_spec\.rb\z}
end
# when a spec is updated, make sure it passes
at.add_mapping %r{\Aspec/#{spec_folders}/(.+)_spec\.rb\z} do |filename,_|
filename
end
# when the collection shared spec is update, make sure all dependent specs pass
at.add_mapping %r{\Aspec/lib/collection_shared_spec\.rb\z} do
at.files_matching %r{\Aspec/#{spec_folders}/collection_spec\.rb\z}
end
end