Class: EasyAutomation::Suite

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_automation/suite.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = "Test Suite") ⇒ Suite

Returns a new instance of Suite.



6
7
8
# File 'lib/easy_automation/suite.rb', line 6

def initialize name = "Test Suite"
  @suite = ::Test::Unit::TestSuite.new(name)
end

Instance Attribute Details

#suiteObject (readonly)

Returns the value of attribute suite.



4
5
6
# File 'lib/easy_automation/suite.rb', line 4

def suite
  @suite
end

Instance Method Details

#add(test_name) ⇒ Object

Raises:



10
11
12
13
# File 'lib/easy_automation/suite.rb', line 10

def add test_name
  raise SuiteException.new('Wrong test class, please extend it from EasyAutomation::Test') unless test_name < EasyAutomation::Test
  @suite << test_name.suite
end