Sha256: 430eeb90597a2bd0e6f5c0ae291c271d4643acd0fb4c6b75b53beade5db13fac

Contents?: true

Size: 582 Bytes

Versions: 3

Compression:

Stored size: 582 Bytes

Contents

require "spec_helper"

describe Lita::Handlers::Doubler, lita_handler: true do
  let(:robot) { Lita::Robot.new(registry) }

  subject { described_class.new(robot) }
  
  describe ':double' do
    it { is_expected.to route("Lita double 2") }
    it { is_expected.to route("Lita double    22") }
    it { is_expected.to route("Lita doUble 4") }

    it { is_expected.to_not route("Lita double two") }
    it { is_expected.to_not route("Lita double 1e4") }

    it 'doubles numbers' do
      send_message 'Lita double 2'
      expect(replies.last).to eq('2 + 2 = 4')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lita-doubler-0.1.2 spec/lita/handlers/doubler_spec.rb
lita-doubler-0.1.1 spec/lita/handlers/doubler_spec.rb
lita-doubler-0.1.0 spec/lita/handlers/doubler_spec.rb