Class: DTest::Global::Manager

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/dtest/global.rb

Overview

class Harness

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Singleton

#remove_instance_var

Constructor Details

#initializeManager

Returns a new instance of Manager.



69
70
71
# File 'lib/dtest/global.rb', line 69

def initialize
  clear
end

Instance Attribute Details

#harnessObject

Returns the value of attribute harness.



67
68
69
# File 'lib/dtest/global.rb', line 67

def harness
  @harness
end

Instance Method Details

#after(option = {}, &block) ⇒ Object



84
85
86
87
88
# File 'lib/dtest/global.rb', line 84

def after(option = {}, &block)
  b = Block.new("after", option, &block)
  b.parent = 'Global'
  @harness.after << b
end

#before(option = {}, &block) ⇒ Object



78
79
80
81
82
# File 'lib/dtest/global.rb', line 78

def before(option = {}, &block)
  b = Block.new("before", option, &block)
  b.parent = 'Global'
  @harness.before << b
end

#clearObject



73
74
75
76
# File 'lib/dtest/global.rb', line 73

def clear
  remove_instance_var
  @harness = Harness.new
end