I was checking mock documentation and i had read somewhere that I can use "..." as a parameter, but when I try to use it I receive an error. enter image description here
This is the code that's returning this error:
require_relative '../../lib/random_joke'
describe JokeMessage do
let(:bot) { double }
let(:api) { double }
let(:message) { double }
it 'fires send_message' do
expect(bot).to receive(:api).and_return(api)
expect(api).to receive(:send_message).with(...)
described_class.new(bot: bot, message: message).send_response
end
end
Following the documentation "..." should work. I don't get what I'm doing wrong here.
Aucun commentaire:
Enregistrer un commentaire