forked from Fingertips/passengerpane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.kick
41 lines (37 loc) · 1 KB
/
.kick
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
30
31
32
33
34
35
36
37
38
39
40
41
recipe :ignore
ignore(/^(tmp|Passenger.xcodeproj)/)
recipe :ruby
module Nu
def self.run_tests(files)
test_directory = File.expand_path('../test/passenger_pane', __FILE__)
files.each do |file|
if File.exist?(File.join(test_directory, file))
execute "cd #{test_directory}; /usr/local/bin/nush #{file}"
end
end
end
end
process do |files|
Ruby.run_tests(files.take_and_map do |file|
case file
when %r{^test/ppane/test_helper/add_allow_switch.rb$}
'test/ppane/test_helper/add_allow_switch_test.rb'
when %r{^lib/(.*).rb$}
testfile = "test/ppane/#{File.basename($1)}_test.rb"
if File.exist?(testfile)
files.delete(file)
testfile
end
end
end)
Nu.run_tests(files.take_and_map do |file|
case file
when %r{^app/.*\.[mh]$}
filename = File.basename(file.downcase)
parts = filename.split('.')
"#{parts[0..-2]}_test.nu"
when %r{^test/passenger_pane/.*_test\.nu$}
File.basename(file)
end
end)
end