Class: Rails::TestTask
- Inherits:
-
Rake::TestTask
- Object
- Rake::TestTask
- Rails::TestTask
- Defined in:
- lib/sub_test_task_patch.rb
Overview
:nodoc: all
Defined Under Namespace
Classes: TestCreator, TestInfo
Class Method Summary collapse
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name = :test) ⇒ TestTask
constructor
A new instance of TestTask.
Constructor Details
#initialize(name = :test) ⇒ TestTask
Returns a new instance of TestTask.
104 105 106 107 |
# File 'lib/sub_test_task_patch.rb', line 104 def initialize(name = :test) super @libs << "test" # lib *and* test seem like a better default end |
Class Method Details
.test_creator(tasks) ⇒ Object
99 100 101 102 |
# File 'lib/sub_test_task_patch.rb', line 99 def self.test_creator(tasks) info = TestInfo.new(tasks) TestCreator.new(info) end |
Instance Method Details
#define ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/sub_test_task_patch.rb', line 109 def define task @name do if ENV['TESTOPTS'] ARGV.replace Shellwords.split ENV['TESTOPTS'] end libs = @libs - $LOAD_PATH $LOAD_PATH.unshift(*libs) file_list.each { |fl| FileList[fl].to_a.each { |f| require File. f } } end end |