Module: OpenHAB::RSpec::Mocks::InstanceMethodStasher

Defined in:
lib/openhab/rspec/mocks/instance_method_stasher.rb

Instance Method Summary collapse

Instance Method Details

#initializeObject

Disable “singleton on non-persistent Java type” it doesn’t matter during specs



11
12
13
14
15
16
17
18
# File 'lib/openhab/rspec/mocks/instance_method_stasher.rb', line 11

def initialize(*)
  original_verbose = $VERBOSE
  $VERBOSE = nil

  super
ensure
  $VERBOSE = original_verbose
end