Module: ChatSDK::Testing

Defined in:
lib/chat_sdk/testing.rb,
lib/chat_sdk/testing/helpers.rb,
lib/chat_sdk/testing/fake_adapter.rb,
lib/chat_sdk/testing/recorded_call.rb,
lib/chat_sdk/testing/state_contract.rb,
lib/chat_sdk/testing/adapter_contract.rb

Defined Under Namespace

Modules: AdapterContract, Helpers, StateContract Classes: FakeAdapter, RecordedCall

Class Method Summary collapse

Class Method Details

.build_bot(adapters: nil, state: nil, **options) ⇒ Object



6
7
8
9
10
# File 'lib/chat_sdk/testing.rb', line 6

def build_bot(adapters: nil, state: nil, **options)
  adapters ||= {test: FakeAdapter.new}
  state ||= State::Memory.new
  Chat.new(user_name: "test-bot", adapters: adapters, state: state, **options)
end