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 c423838
Showing 1 changed file with 9 additions and 2 deletions.
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 c423838

Please sign in to comment.