operawatir 0.6.pre1-jruby → 0.7.pre1-jruby

Sign up to get free protection for your applications and to get access to all the features.
data/utils/Rakefile DELETED
@@ -1,79 +0,0 @@
1
- require "rubygems"
2
- require "spec"
3
- require "spec/rake/spectask"
4
- require "pathname"
5
-
6
- all_tests = {}
7
- all_files = Dir["**/*.rb"]
8
-
9
- all_files.each do |filename|
10
- if filename =~ /\//
11
- sub = filename.split("/")
12
- subfilename = sub[1]
13
-
14
- unless all_tests.has_key?(sub[0])
15
- all_tests.merge!({sub[0] => {}})
16
- end
17
-
18
- test = {subfilename[0..-4] => subfilename}
19
- all_tests[sub[0]].merge!(test)
20
- elsif filename =~ /helper.rb/
21
- next
22
- else
23
- test = {filename[0..-4] => filename}
24
- all_tests.merge!(test)
25
- end
26
- end
27
-
28
- spec_opts = ["--color", "--require rubygems"] #, "--format OperaHelperFormatter"]
29
- spec_files = []
30
-
31
- # All tests
32
- desc "All tests"
33
- Spec::Rake::SpecTask.new("test") do |t|
34
- all_tests.each do |testname, testfile|
35
- if testfile.kind_of?(Hash)
36
- testfile.each do |subtestname, subtestfile|
37
- spec_files.push testname + "/" + subtestfile
38
- end
39
- else
40
- spec_files.push testfile
41
- end
42
- end
43
-
44
- t.spec_opts = spec_opts
45
- t.spec_files = [spec_files]
46
- end
47
-
48
- namespace :test do
49
- all_tests.each_pair do |testname, testfile|
50
- if testfile.kind_of?(Hash)
51
- testfile.each_pair do |subtestname, subtestfile|
52
- testfile[subtestname] = testname + "/" + subtestfile
53
- end
54
-
55
- desc "All " + testname + " tests"
56
- Spec::Rake::SpecTask.new(testname) do |t|
57
- t.spec_opts = spec_opts
58
- t.spec_files = testfile.values
59
- end
60
-
61
- namespace testname do
62
- testfile.each_pair do |subtestname, subtestfile|
63
- desc subtestname + " tests"
64
- Spec::Rake::SpecTask.new(subtestname) do |t|
65
- t.spec_opts = spec_opts
66
- t.spec_files = [subtestfile]
67
- end
68
- end
69
- end
70
- else
71
- desc testname + " tests"
72
- Spec::Rake::SpecTask.new(testname) do |t|
73
- t.spec_opts = spec_opts
74
- t.spec_files = [testfile]
75
- end
76
- end
77
- end
78
- end
79
-