Class: SauceTest::Rake::BaseTask

Inherits:
Object
  • Object
show all
Defined in:
lib/sauce-test/rake/tasks.rb

Direct Known Subclasses

RSpecTask, TestUnitTask

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) {|_self| ... } ⇒ BaseTask

Returns a new instance of BaseTask.

Yields:

  • (_self)

Yield Parameters:



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/sauce-test/rake/tasks.rb', line 10

def initialize(name)
  @name = name
  @browsers = [{'os' => "Linux", 'name' => "firefox", 'version' => 3},
               {'os' => "Windows 2003", 'name' => "iexplore", 'version' => 7}]
  @workers = 1
  @config = 'config/sauce.yml'
  @report = 'reports/sauce_test'

  yield self if block_given?

  define_task
end

Instance Attribute Details

#browsersObject

Returns the value of attribute browsers.



8
9
10
# File 'lib/sauce-test/rake/tasks.rb', line 8

def browsers
  @browsers
end

#configObject

Returns the value of attribute config.



8
9
10
# File 'lib/sauce-test/rake/tasks.rb', line 8

def config
  @config
end

#filesObject

Returns the value of attribute files.



8
9
10
# File 'lib/sauce-test/rake/tasks.rb', line 8

def files
  @files
end

#reportObject

Returns the value of attribute report.



8
9
10
# File 'lib/sauce-test/rake/tasks.rb', line 8

def report
  @report
end

#workersObject

Returns the value of attribute workers.



8
9
10
# File 'lib/sauce-test/rake/tasks.rb', line 8

def workers
  @workers
end

Instance Method Details

#define_taskObject



23
24
25
26
27
# File 'lib/sauce-test/rake/tasks.rb', line 23

def define_task
  task @name do
    SauceTest::Collection.run(@files, @browsers, @workers, @config, @report, @type)
  end
end