spec/dsl_spec.rb in chatterbot-2.0.5 vs spec/dsl_spec.rb in chatterbot-2.1.0
- old
+ new
@@ -98,11 +98,11 @@
end
end
describe "search" do
it "passes along to bot object" do
- allow(@bot).to receive(:run_or_stream)
+ allow(@bot).to receive(:run!)
expect(@bot).to receive(:register_handler).with(:search, ["foo"])
search("foo") {}
end
it "passes multiple queries along to bot object" do
@@ -116,42 +116,10 @@
expect(@bot).to receive(:register_handler).with(:direct_messages, instance_of(Proc))
direct_messages {}
end
end
- describe "favorited" do
- it "passes along to bot object" do
- expect(@bot).to receive(:register_handler).with(:favorited, instance_of(Proc))
-
- favorited {}
- end
- end
-
- describe "followed" do
- it "passes along to bot object" do
- expect(@bot).to receive(:register_handler).with(:followed, instance_of(Proc))
-
- followed {}
- end
- end
-
- describe "deleted" do
- it "passes along to bot object" do
- expect(@bot).to receive(:register_handler).with(:deleted, instance_of(Proc))
-
- deleted {}
- end
- end
-
- describe "streaming" do
- it "passes along to bot object" do
- expect(@bot).to receive(:streaming=).with(true)
- use_streaming
- end
- end
-
-
it "#retweet passes along to bot object" do
expect(@bot).to receive(:retweet).with(1234)
retweet(1234)
end