Class: TTK::Strategies::Sleep

Inherits:
Strategy show all
Includes:
Concrete
Defined in:
lib/ttk/strategies/Sleep.rb

Overview

A test strategy class that only sleep for a moment before to pass.

Instance Attribute Summary

Attributes inherited from Strategy

#status, #symtbl

Instance Method Summary collapse

Methods inherited from Strategy

#abort, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize, #initialize_flow_factory, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #strategy, #strategy=, #symbols=, #testify, #timeout=, #to_s, #wclass=

Constructor Details

This class inherits a constructor from TTK::Strategies::Strategy

Instance Method Details

#delay=(other) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/ttk/strategies/Sleep.rb', line 15

def delay=(other)
  other = other.to_f
  if other >= 0
    @delay = other
  else
    raise(ArgumentError, "`#{other}' - sleep delay must be >= 0")
  end
end