Class: XULTestRunner::TestTask

Inherits:
Object
  • Object
show all
Defined in:
lib/xultestrunner/tasks/test_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task_name = "test") {|_self| ... } ⇒ TestTask

Returns a new instance of TestTask.

Yields:

  • (_self)

Yield Parameters:



9
10
11
12
13
# File 'lib/xultestrunner/tasks/test_task.rb', line 9

def initialize(task_name = "test")
  desc("Runs XULTestRunner based tests")
  yield(self)
  task(task_name) { self.invoke }
end

Instance Attribute Details

#test_dirObject

TODO - allow for multiple ‘test libs’ options and once xultestrunner is better, allow for test patterns



7
8
9
# File 'lib/xultestrunner/tasks/test_task.rb', line 7

def test_dir
  @test_dir
end

#test_libObject

TODO - allow for multiple ‘test libs’ options and once xultestrunner is better, allow for test patterns



7
8
9
# File 'lib/xultestrunner/tasks/test_task.rb', line 7

def test_lib
  @test_lib
end

Instance Method Details

#invokeObject



15
16
17
# File 'lib/xultestrunner/tasks/test_task.rb', line 15

def invoke
  system("xpcomcore", "launch", "xultestrunner", "--", "-testDir", test_dir, "-testLibs", test_lib)
end