Class: DeepTest::TestTask
- Inherits:
-
Object
- Object
- DeepTest::TestTask
- Defined in:
- lib/deep_test/test_task.rb
Instance Attribute Summary collapse
-
#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 |
# File 'lib/deep_test/test_task.rb', line 5 def initialize(name = :deep_test) @requires = [] @name = name @options = Options.new({}) self.pattern = "test/**/*_test.rb" yield self if block_given? define end |
Instance Attribute Details
#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
14 15 16 17 18 19 20 |
# File 'lib/deep_test/test_task.rb', line 14 def define desc "Run '#{@name}' suite using DeepTest" task @name do = requires.map {|f| "-r#{f}"}.join(" ") ruby "#{} #{runner} '#{@options.to_command_line}'" end end |
#pattern=(pattern) ⇒ Object
34 35 36 |
# File 'lib/deep_test/test_task.rb', line 34 def pattern=(pattern) @options.pattern = Dir.pwd + "/" + pattern end |