Sha256: 97f61e6ef87d49394133a0888af1a7f9d7b99f9aa53077b31ed04ef5f3e386fc

Contents?: true

Size: 661 Bytes

Versions: 12

Compression:

Stored size: 661 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Twitch::Bot::Adapter::Terminal do
  describe "#receive_message" do
    it "receives all messages from channel owner" do
      config = Twitch::Bot::Config.new(
        settings: {
          bot_user: "testuser",
          adapter: "Twitch::Bot::Adapter::Terminal",
        },
      )
      client = Twitch::Bot::Client.new(
        config: config,
        channel: "testchannel",
      )
      adapter = described_class.new(client: client)
      allow(adapter).to receive(:read_terminal).and_return("Hello")

      message = adapter.read_data

      expect(message.user).to eq client.channel.name
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
twitch-bot-6.0.0 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-5.0.6 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-5.0.5 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-5.0.4 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-5.0.2 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-5.0.1 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-5.0.0 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-4.1.1 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-4.1.0 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-4.0.1 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-4.0.0 spec/twitch/bot/adapter/terminal_spec.rb
twitch-bot-3.2.1 spec/twitch/bot/adapter/terminal_spec.rb