This website works better with JavaScript.
Home
Explore
Help
Sign In
larke12
/
slack-pixiv-bot
Watch
1
Star
0
Fork
0
Code
Issues
4
Pull Requests
Projects
Releases
Wiki
Activity
Browse Source
Set the bot name once.
master
dblock
9 years ago
parent
2c9d493b29
commit
557a409800
8 changed files
with
11 additions
and
16 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
Gemfile.lock
+0
-3
spec/slack-mathbot/commands/about_spec.rb
+0
-3
spec/slack-mathbot/commands/calculate_spec.rb
+0
-3
spec/slack-mathbot/commands/help_spec.rb
+0
-3
spec/slack-mathbot/commands/hi_spec.rb
+0
-3
spec/slack-mathbot/commands/unknown_spec.rb
+5
-0
spec/spec_helper.rb
+5
-0
spec/support/slack_mathbot.rb
+ 1
- 1
Gemfile.lock
View File
@ -1,6 +1,6 @@
GIT
remote: git://github.com/dblock/slack-ruby-bot.git
revision:
edef7edd1c0e0f5abe70ab801593f4a2ef66766b
revision:
22f150f027d15c1a195692db0decf6bb4c850b7d
specs:
slack-ruby-bot (0.2.0)
activesupport
+ 0
- 3
spec/slack-mathbot/commands/about_spec.rb
View File
@ -4,9 +4,6 @@ describe SlackMathbot::Commands::Default do
def
app
SlackMathbot
::
App
.
new
end
before
do
app
.
config
.
user
=
'mathbot'
end
it
'mathbot'
do
expect
(
message
:
'mathbot'
)
.
to
respond_with_slack_message
(
SlackMathbot
::
ABOUT
)
end
+ 0
- 3
spec/slack-mathbot/commands/calculate_spec.rb
View File
@ -4,9 +4,6 @@ describe SlackMathbot::Commands::Calculate, vcr: { cassette_name: 'user_info' }
def
app
SlackMathbot
::
App
.
new
end
before
do
app
.
config
.
user
=
'mathbot'
end
it
'adds two numbers'
do
expect
(
message
:
'mathbot calculate 2+2'
,
channel
:
'channel'
)
.
to
respond_with_slack_message
(
'4'
)
end
+ 0
- 3
spec/slack-mathbot/commands/help_spec.rb
View File
@ -4,9 +4,6 @@ describe SlackMathbot::Commands::Help do
def
app
SlackMathbot
::
App
.
new
end
before
do
app
.
config
.
user
=
'mathbot'
end
it
'help'
do
expect
(
message
:
'mathbot help'
)
.
to
respond_with_slack_message
(
'See https://github.com/dblock/slack-mathbot, please.'
)
end
+ 0
- 3
spec/slack-mathbot/commands/hi_spec.rb
View File
@ -4,9 +4,6 @@ describe SlackRubyBot::Commands::Hi do
def
app
SlackMathbot
::
App
.
new
end
before
do
app
.
config
.
user
=
'mathbot'
end
it
'says hi'
do
expect
(
message
:
'mathbot hi'
)
.
to
respond_with_slack_message
(
'Hi <@user>!'
)
end
+ 0
- 3
spec/slack-mathbot/commands/unknown_spec.rb
View File
@ -4,9 +4,6 @@ describe SlackRubyBot::Commands::Unknown, vcr: { cassette_name: 'user_info' } do
def
app
SlackMathbot
::
App
.
new
end
before
do
app
.
config
.
user
=
'mathbot'
end
it
'invalid command'
do
expect
(
message
:
'mathbot foobar'
)
.
to
respond_with_slack_message
(
"
Sorry <@user>, I don't understand that command!
"
)
end
+ 5
- 0
spec/spec_helper.rb
View File
@ -1,4 +1,9 @@
$LOAD_PATH
.
unshift
(
File
.
join
(
File
.
dirname
(
__FILE__
)
,
'..'
)
)
require
'slack-ruby-bot/rspec'
Dir
[
File
.
join
(
File
.
dirname
(
__FILE__
)
,
'support'
,
'**/*.rb'
)
]
.
each
do
|
file
|
require
file
end
require
'slack-mathbot'
+ 5
- 0
spec/support/slack_mathbot.rb
View File
@ -0,0 +1,5 @@
RSpec
.
configure
do
|
config
|
config
.
before
do
SlackRubyBot
.
config
.
user
=
'mathbot'
end
end
Write
Preview
Loading…
Cancel
Save