spec/dsl_spec.rb in chatterbot-0.3.0 vs spec/dsl_spec.rb in chatterbot-0.4.0

- old
+ new

@@ -6,11 +6,11 @@ @bot = mock(Chatterbot::Bot) @bot.send :require, 'chatterbot/dsl' Chatterbot::DSL.stub!(:bot).and_return(@bot) end - + describe "blacklist" do it "#blacklist passes along to bot object" do @bot.should_receive(:blacklist=).with(["foo"]) blacklist ["foo"] end @@ -84,9 +84,23 @@ end it "#reply passes along to bot object" do @bot.should_receive(:reply).with("hello sailor!", { :source => "source "}) reply "hello sailor!", { :source => "source "} + end + + describe "update_config" do + it "should pass to bot object" do + @bot.should_receive(:update_config) + update_config + end end - + + describe "since_id" do + it "should pass to bot object" do + @bot.should_receive(:config).and_return({:since_id => 1234}) + since_id.should == 1234 + end + end + end end