Class: DeepTest::TestTask
- Inherits:
-
Object
- Object
- DeepTest::TestTask
- Defined in:
- lib/deep_test/test_task.rb
Instance Attribute Summary collapse
-
#libs ⇒ Object
Returns the value of attribute libs.
-
#requires ⇒ Object
Returns the value of attribute requires.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name = :deep_test) {|_self| ... } ⇒ TestTask
constructor
A new instance of TestTask.
- #pattern=(pattern) ⇒ Object
Constructor Details
#initialize(name = :deep_test) {|_self| ... } ⇒ TestTask
Returns a new instance of TestTask.
5 6 7 8 9 10 11 12 13 |
# File 'lib/deep_test/test_task.rb', line 5 def initialize(name = :deep_test) @requires = [] @name = name @libs = ["lib"] @options = Options.new({}) self.pattern = "test/**/*_test.rb" yield self if block_given? define end |
Instance Attribute Details
#libs ⇒ Object
Returns the value of attribute libs.
3 4 5 |
# File 'lib/deep_test/test_task.rb', line 3 def libs @libs end |
#requires ⇒ Object
Returns the value of attribute requires.
3 4 5 |
# File 'lib/deep_test/test_task.rb', line 3 def requires @requires end |
Instance Method Details
#define ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/deep_test/test_task.rb', line 15 def define desc "Run '#{@name}' suite using DeepTest" task @name do = @libs.any? ? "-I" + @libs.join(File::PATH_SEPARATOR) : "" = requires.map {|f| "-r#{f}"}.join(" ") ruby "#{} #{} #{runner} '#{@options.to_command_line}'" end end |
#pattern=(pattern) ⇒ Object
36 37 38 |
# File 'lib/deep_test/test_task.rb', line 36 def pattern=(pattern) @options.pattern = Dir.pwd + "/" + pattern end |