Sha256: 74723378de2b0b04d68bb2405a27acdbb7712284a00fd093991ed2a406d847cb

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

describe Lita::Handlers::OnewheelWordJumble, lita_handler: true do

  before(:each) do
    # registry.configure do |config|
    #   config.handlers.onewheel_word_jumble.api_key = 'xyz'
    # end
  end

  it { is_expected.to route_command('words abcde 3') }
  it { is_expected.to route_command('words abcde') }

  it 'solves yer jumble' do
    send_command 'words aelb'
    expect(replies.last).to_not be(nil)
    expect(replies.count).to be(1)
    expect(replies.last).to eq('abe, alb, ale, bae, bal, bea, bel, elb, lab, lea, abel, able, albe, bale, beal, bela, blae')
  end

  it 'solves yer jumble' do
    send_command 'words aelb 4'
    expect(replies.last).to_not be(nil)
    expect(replies.count).to be(1)
    expect(replies.last).to eq('abel, able, albe, bale, beal, bela, blae')
  end

  it 'solves yer jumble' do
    send_command 'words aelb 3'
    expect(replies.last).to_not be(nil)
    expect(replies.count).to be(1)
    expect(replies.last).to eq('abe, alb, ale, bae, bal, bea, bel, elb, lab, lea')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lita-onewheel-word-jumble-0.1.1 spec/lita/handlers/onewheel_word_jumble_spec.rb