lita 4.6.0 → 4.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/rspec/handler.rb +6 -1
- data/lib/lita/version.rb +1 -1
- data/spec/lita/rspec_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9295abc12e6621138e9f2602d30d6977e13f7f12
|
4
|
+
data.tar.gz: 666be99b367480d300ea73db1ed636b0d8415159
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85b5b54aeb3177d59db615dc7f4ba463fdf57e9c17bb2d8feb56d856d5d7f72e1f7fe59e69fd2aca1952b626b72d5110de0d6212d91113da2fdd565caa0aea28
|
7
|
+
data.tar.gz: aa711df3dd45a73da88a7ae89bae270bc43f9e242b38b92ae1507d3c22264845f7be8455bf567b43f69e4eed87abfaaf9af199740256494361fff0edd682ce21
|
data/lib/lita/rspec/handler.rb
CHANGED
@@ -64,7 +64,6 @@ module Lita
|
|
64
64
|
let(:robot) { Robot.new(registry) }
|
65
65
|
let(:source) { Source.new(user: user) }
|
66
66
|
let(:user) { User.create("1", name: "Test User") }
|
67
|
-
let(:replies) { robot.chat_service.sent_messages }
|
68
67
|
end
|
69
68
|
end
|
70
69
|
|
@@ -76,6 +75,12 @@ module Lita
|
|
76
75
|
end
|
77
76
|
end
|
78
77
|
|
78
|
+
# An array of strings that have been sent by the robot during the course of a test.
|
79
|
+
# @return [Array<String>] The replies.
|
80
|
+
def replies
|
81
|
+
robot.chat_service.sent_messages
|
82
|
+
end
|
83
|
+
|
79
84
|
# Sends a message to the robot.
|
80
85
|
# @param body [String] The message to send.
|
81
86
|
# @param as [Lita::User] The user sending the message.
|
data/lib/lita/version.rb
CHANGED
data/spec/lita/rspec_spec.rb
CHANGED
@@ -117,6 +117,12 @@ describe handler_class, lita_handler: true do
|
|
117
117
|
send_message("message")
|
118
118
|
expect(replies).to eq(["Test User"])
|
119
119
|
end
|
120
|
+
|
121
|
+
it "does not memoize #replies on first access" do
|
122
|
+
replies
|
123
|
+
send_message("message")
|
124
|
+
expect(replies).to eq(["Test User"])
|
125
|
+
end
|
120
126
|
end
|
121
127
|
|
122
128
|
describe "#channel" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.6.
|
4
|
+
version: 4.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Cuadra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|