Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion spec/agents/tenant_auto_create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,17 @@ def user_prompt
Object.send(:remove_const, :AutoCreateTenantTestAgent) if Object.const_defined?(:AutoCreateTenantTestAgent)
end

# Enable multi-tenancy so execution records include tenant_id
# Enable multi-tenancy and ensure tracking is on so execution records are created
around do |example|
original_multi_tenancy = RubyLLM::Agents.configuration.multi_tenancy_enabled
original_track_executions = RubyLLM::Agents.configuration.track_executions
RubyLLM::Agents.configuration.multi_tenancy_enabled = true
RubyLLM::Agents.configuration.track_executions = true

example.run
ensure
RubyLLM::Agents.configuration.multi_tenancy_enabled = original_multi_tenancy
RubyLLM::Agents.configuration.track_executions = original_track_executions
end

# Stub the LLM call so we don't hit real APIs
Expand Down