Module: TenantKit::Testing
- Defined in:
- lib/tenant_kit/testing.rb
Overview
Opt-in test helpers. Require and include where you need them — they are not loaded by default.
Instance Method Summary collapse
-
#as_tenant(tenant) { ... } ⇒ Object
Runs the block scoped to
tenant(alias for with_tenant). -
#without_tenant { ... } ⇒ Object
Runs the block with tenant scoping disabled (alias for without_tenant).
Instance Method Details
#as_tenant(tenant) { ... } ⇒ Object
Runs the block scoped to tenant (alias for TenantKit.with_tenant).
21 22 23 |
# File 'lib/tenant_kit/testing.rb', line 21 def as_tenant(tenant, &block) TenantKit.with_tenant(tenant, &block) end |
#without_tenant { ... } ⇒ Object
Runs the block with tenant scoping disabled (alias for TenantKit.without_tenant).
30 31 32 |
# File 'lib/tenant_kit/testing.rb', line 30 def without_tenant(&block) TenantKit.without_tenant(&block) end |