Module: MultiTenantSupport::Test::System

Defined in:
lib/multi_tenant_support/test/system.rb

Instance Method Summary collapse

Instance Method Details

#keep_context_tenant_unchangeObject



28
29
30
31
32
33
34
# File 'lib/multi_tenant_support/test/system.rb', line 28

def keep_context_tenant_unchange
  _current_tenant = MultiTenantSupport::Current.
  MultiTenantSupport::Current. = nil # Simulate real circumstance
  yield
ensure
  MultiTenantSupport::Current. = _current_tenant
end