Skip to content

Commit

Permalink
Fixed a couple of problems in TUTORIAL.md
Browse files Browse the repository at this point in the history
  • Loading branch information
edruder-block committed Oct 12, 2016
1 parent 12f3c12 commit d067fda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 0.9.1 (Next)

* [#98](https://github.com/slack-ruby/slack-ruby-bot/pull/98): Fixed a couple of problems in TUTORIAL.md - [@edruder](https://github.com/edruder).
* [#95](https://github.com/slack-ruby/slack-ruby-bot/pull/95): Log team name and ID on successful connection - [@dblock](https://github.com/dblock).
* [#94](https://github.com/slack-ruby/slack-ruby-bot/pull/94): Use the slack-ruby-danger gem - [@dblock](https://github.com/dblock).
* [#86](https://github.com/dblock/slack-ruby-bot/pull/86): Fix: help statements from classes that do not directly inherit from `Base` appear in `bot help` - [@maclover7](https://github.com/maclover7).
Expand Down
11 changes: 9 additions & 2 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gem 'slack-ruby-bot'
gem 'puma'
gem 'sinatra'
gem 'dotenv'
gem 'celluloid-io'

group :development, :test do
gem 'rake'
Expand Down Expand Up @@ -172,15 +173,18 @@ require 'slack-mathbot'

#### Test the Bot Application

Create a test for the bot application itself in `spec/slack-mathbot/app_spec.rb`.
Create a test for the bot application itself in `spec/slack-mathbot/bot_spec.rb`.

```ruby
require 'spec_helper'

describe SlackMathbot::App do
describe SlackMathbot::Bot do
def app
SlackMathbot::Bot.instance
end

subject { app }

it_behaves_like 'a slack ruby bot'
end
```
Expand All @@ -196,6 +200,9 @@ describe SlackMathbot::Commands::Calculate do
def app
SlackMathbot::Bot.instance
end

subject { app }

it 'returns 4' do
expect(message: "#{SlackRubyBot.config.user} calculate 2+2", channel: 'channel').to respond_with_slack_message('4')
end
Expand Down

0 comments on commit d067fda

Please sign in to comment.