Class: Lookout::Rake::Tasks::Test
- Defined in:
- lib/lookout/rake/tasks/test.rb
Constant Summary collapse
- LoaderPath =
File.join(File.dirname(__FILE__), 'test/loader.rb')
Instance Attribute Summary collapse
-
#requires ⇒ Object
Returns the value of attribute requires.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(specification = Lookout::Rake::Tasks.specification, name = :test) {|_self| ... } ⇒ Test
constructor
A new instance of Test.
Constructor Details
#initialize(specification = Lookout::Rake::Tasks.specification, name = :test) {|_self| ... } ⇒ Test
Returns a new instance of Test.
6 7 8 9 10 |
# File 'lib/lookout/rake/tasks/test.rb', line 6 def initialize(specification = Lookout::Rake::Tasks.specification, name = :test) self.specification, @name = specification, name yield self if block_given? define end |
Instance Attribute Details
#requires ⇒ Object
Returns the value of attribute requires.
21 22 23 |
# File 'lib/lookout/rake/tasks/test.rb', line 21 def requires @requires end |
Instance Method Details
#define ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/lookout/rake/tasks/test.rb', line 12 def define desc @name == :test ? 'Run tests' : 'Run tests for %s' % @name task @name do ruby '-w %s -- %s %s' % [, escape(LoaderPath), arguments] end task :default => @name unless Rake::Task.task_defined? :default end |