1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
Author: HIGUCHI Daisuke (VDR dai) <dai@debian.org>
Description: fix FTBFS with ruby-rspec 3.12
Bug-Debian: https://bugs.debian.org/1027090
Last-Update: 2023-01-03
Index: ruby-slack-messenger/spec/end_to_end_spec.rb
===================================================================
--- ruby-slack-messenger.orig/spec/end_to_end_spec.rb
+++ ruby-slack-messenger/spec/end_to_end_spec.rb
@@ -88,7 +88,7 @@ RSpec.describe Slack::Messenger do
end
expect(client).to receive(:post)
- .with(URI.parse("http://example.com"), payload: { text: "Hello [world](http://example.com)!" }.to_json)
+ .with(URI.parse("http://example.com"), { payload: { text: "Hello [world](http://example.com)!" }.to_json })
messenger.post text: "Hello [world](http://example.com)!"
end
Index: ruby-slack-messenger/spec/lib/slack-messenger/payload_middleware/stack_spec.rb
===================================================================
--- ruby-slack-messenger.orig/spec/lib/slack-messenger/payload_middleware/stack_spec.rb
+++ ruby-slack-messenger/spec/lib/slack-messenger/payload_middleware/stack_spec.rb
@@ -65,8 +65,8 @@ RSpec.describe Slack::Messenger::Payload
end
it "creates a stack from hashes passing them as opts" do
- expect(return_one).to receive(:new).with(:messenger, opts: :for_one)
- expect(return_two).to receive(:new).with(:messenger, opts: :for_two)
+ expect(return_one).to receive(:new).with(:messenger, { opts: :for_one })
+ expect(return_two).to receive(:new).with(:messenger, { opts: :for_two })
subject = described_class.new(:messenger)
subject.set return_one: { opts: :for_one },
Index: ruby-slack-messenger/spec/lib/slack-messenger_spec.rb
===================================================================
--- ruby-slack-messenger.orig/spec/lib/slack-messenger_spec.rb
+++ ruby-slack-messenger/spec/lib/slack-messenger_spec.rb
@@ -39,7 +39,7 @@ RSpec.describe Slack::Messenger do
describe "#ping" do
it "calls #post with the message as the text key in #post" do
subject = described_class.new "http://example.com"
- expect(subject).to receive(:post).with text: "message"
+ expect(subject).to receive(:post).with({ text: "message" })
subject.ping "message"
end
@@ -60,7 +60,7 @@ RSpec.describe Slack::Messenger do
expect(mock_http).to receive(:post).with(
URI.parse("http://example.com"),
- payload: '{"channel":"default","user":"rocket","text":"hello"}'
+ { payload: '{"channel":"default","user":"rocket","text":"hello"}' }
)
subject.post text: "hello"
@@ -71,7 +71,7 @@ RSpec.describe Slack::Messenger do
expect(mock_http).to receive(:post).with(
URI.parse("http://example.com"),
- payload: '{"channel":"new","user":"ship","text":"hello"}'
+ { payload: '{"channel":"new","user":"ship","text":"hello"}' }
)
subject.post text: "hello", channel: "new", user: "ship"
@@ -83,12 +83,12 @@ RSpec.describe Slack::Messenger do
subject.instance_variable_set(:@middleware, stack)
expect(stack).to receive(:call)
- .with(channel: "default", user: "rocket")
+ .with({ channel: "default", user: "rocket" })
.and_return([test: "stack"])
expect(mock_http).to receive(:post).with(
URI.parse("http://example.com"),
- payload: '{"test":"stack"}'
+ { payload: '{"test":"stack"}' }
)
responses = subject.post
|