Sha256: 7d21a162f0170907ceb442d71589c66d956ef55f21aa8b5b1c3bdba9489dcde5

Contents?: true

Size: 466 Bytes

Versions: 8

Compression:

Stored size: 466 Bytes

Contents

require 'spec_helper'

describe SlackRubyBot::Commands do
  let! :command do
    Class.new(SlackRubyBot::Commands::Base) do
      match(/^Reticulate (?<spline_name>\w*)$/) do |client, data, match|
        send_message client, data.channel, "Reticulated #{match[:spline_name]}."
      end
    end
  end
  def app
    SlackRubyBot::App.new
  end
  it 'matches' do
    expect(message: 'Reticulate spline').to respond_with_slack_message('Reticulated spline.')
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
slack-ruby-bot-bhe-0.5.5.3 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.5.5 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.5.4 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.5.3 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.5.2 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.5.1 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.5.0 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.4.5 spec/slack-ruby-bot/commands/match_spec.rb