Class: Oktobertest::Scope
- Inherits:
-
Object
- Object
- Oktobertest::Scope
- Defined in:
- lib/oktobertest.rb
Instance Method Summary collapse
-
#initialize(name = nil, &block) ⇒ Scope
constructor
A new instance of Scope.
- #run ⇒ Object
- #run? ⇒ Boolean
Constructor Details
#initialize(name = nil, &block) ⇒ Scope
Returns a new instance of Scope.
50 51 52 53 |
# File 'lib/oktobertest.rb', line 50 def initialize(name = nil, &block) @name, @block = name.to_s, block @setup, @teardown = [], [] end |
Instance Method Details
#run ⇒ Object
55 56 57 |
# File 'lib/oktobertest.rb', line 55 def run instance_eval &@block end |
#run? ⇒ Boolean
59 60 61 |
# File 'lib/oktobertest.rb', line 59 def run? !ENV['S'] || ENV['S'] == @name end |