spec/reply_spec.rb in chatterbot-0.2.8 vs spec/reply_spec.rb in chatterbot-0.2.9

- old
+ new

@@ -70,8 +70,18 @@ bot.client.should_receive(:replies).with({ }) bot.replies end - + + + it "outputs an error if we get one from API" do + bot = test_bot + bot.stub!(:require_login).and_return(true) + bot.stub!(:client).and_return(mock(Object, :replies => {"error" => "You messed up"})) + + bot.should_receive(:critical).with("You messed up") + + bot.replies + end end