jason-o-matic-deep_test 1.2.2.13 → 1.2.2.14
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/deep_test/test_task.rb +4 -2
- metadata +1 -1
data/lib/deep_test/test_task.rb
CHANGED
@@ -2,7 +2,7 @@ module DeepTest
|
|
2
2
|
class TestTask
|
3
3
|
attr_accessor :libs, :requires
|
4
4
|
|
5
|
-
def initialize(name = :deep_test)
|
5
|
+
def initialize(name = :deep_test, &block)
|
6
6
|
# @requires = []
|
7
7
|
@name = name
|
8
8
|
# @libs = ["lib"]
|
@@ -12,7 +12,8 @@ module DeepTest
|
|
12
12
|
@options.libs = ["lib"]
|
13
13
|
|
14
14
|
self.pattern = "test/**/*_test.rb"
|
15
|
-
|
15
|
+
# yield self if block_given?
|
16
|
+
@config_block = block
|
16
17
|
define
|
17
18
|
end
|
18
19
|
|
@@ -20,6 +21,7 @@ module DeepTest
|
|
20
21
|
require 'rake'
|
21
22
|
desc "Run '#{@name}' suite using DeepTest"
|
22
23
|
task @name do
|
24
|
+
@config_block.call(self)
|
23
25
|
lib_options = libs.any? ? "-I" + libs.join(File::PATH_SEPARATOR) : ""
|
24
26
|
require_options = requires.map {|f| "-r#{f}"}.join(" ")
|
25
27
|
ruby "#{lib_options} #{require_options} #{runner} '#{@options.to_command_line}'"
|