Skip to content

Commit b84cf05

Browse files
test(slack-bot): add joke texts test
1 parent 2386fc5 commit b84cf05

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
--require spec_helper
2+
--format documentation

lib/command/slack_crawler.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
require 'httparty'
2+
require 'nokogiri'
3+
14
# Say hello class implementation
25
class Hello
36
def self.say_hello

spec/slack_command_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,18 @@
77
end
88
end
99
end
10+
11+
describe Text do
12+
describe '#text_jokes' do
13+
it 'should return a string array' do
14+
expect(Text.text_jokes).to be_an(Array)
15+
end
16+
end
17+
18+
describe '#text_random_joke' do
19+
it 'should return a string' do
20+
expect(Text.text_random_joke).to be_a(String)
21+
end
22+
end
23+
end
24+

0 commit comments

Comments
 (0)