spec/tweet_spec.rb in chatterbot-2.0.0.pre vs spec/tweet_spec.rb in chatterbot-2.0.2

- old
+ new

@@ -39,11 +39,11 @@ describe "#reply" do it "calls require_login when replying" do bot = test_bot expect(bot).to receive(:require_login).and_return(false) - bot.reply "reply test!", {"id" => 100} + bot.reply "reply test!", fake_tweet(100) end it "calls client.update with the right values" do bot = test_bot expect(bot).to receive(:require_login).and_return(true) @@ -51,15 +51,12 @@ allow(bot).to receive(:debug_mode?).and_return(false) test_str = "test!" - s = { - :id => 100 - } expect(bot.client).to receive(:update).with(test_str, {:in_reply_to_status_id => 100}) - bot.reply test_str, s + bot.reply test_str, fake_tweet(100, 100) end it "doesn't reply when debug_mode? is set" do bot = test_bot @@ -67,10 +64,10 @@ allow(bot).to receive(:client).and_return(double(Twitter::Client)) allow(bot).to receive(:debug_mode?).and_return(true) expect(bot.client).not_to receive(:update) - bot.reply "no reply test!", {:id => 100} + bot.reply "no reply test!", fake_tweet(100) end end end