lita-abuse 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/abuse.rb +1 -0
- data/lita-abuse.gemspec +1 -1
- data/spec/lita/handlers/abuse_spec.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62aad1be6dfa967d50ab80777481b16b76e30b39
|
4
|
+
data.tar.gz: 1d65357c3ca92fe6037beac89a2d73e160e00392
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c99aeb197a0b4707893c38b39d886bd2220614f4c9d10f7ebd174b5374a3cba681cbb7468ee24fae23bfdeeb352487679ed92e0b7697bb9683103f7dff5b5731
|
7
|
+
data.tar.gz: 7c180f8c6d2c68f2d3764d531faa0cb3433f1f750d3308996870f6eeaac32987234b00cb459602aab26861473f80279a0b98a6a8f090588f827f2d887de9a103
|
data/lib/lita/handlers/abuse.rb
CHANGED
data/lita-abuse.gemspec
CHANGED
@@ -7,10 +7,16 @@ RSpec.describe Lita::Handlers::Abuse, :lita_handler => true do
|
|
7
7
|
|
8
8
|
describe "#abuse" do
|
9
9
|
it { is_expected.to route("Lita abuse Andy") }
|
10
|
+
it { is_expected.to route("Lita abuse @andy") }
|
10
11
|
|
11
|
-
it "
|
12
|
+
it "responses to names that are not mentions" do
|
12
13
|
send_message("Lita abuse Andy")
|
13
14
|
expect(replies.last).to match(/Andy you are a (\w+\s)(\w+\s)(\w+\s*)/)
|
14
15
|
end
|
16
|
+
|
17
|
+
it "responses to mentions" do
|
18
|
+
send_message("Lita abuse @andy")
|
19
|
+
expect(replies.last).to match(/<@andy> you are a (\w+\s)(\w+\s)(\w+\s*)/)
|
20
|
+
end
|
15
21
|
end
|
16
22
|
end
|