spec/logging_spec.rb in chatterbot-0.7.0 vs spec/logging_spec.rb in chatterbot-0.7.1
- old
+ new
@@ -2,12 +2,12 @@
describe "Chatterbot::Logging" do
describe "debug logging" do
before(:each) do
@bot = Chatterbot::Bot.new
- @logger = mock(Logger)
- @bot.stub!(:logger).and_return(@logger)
+ @logger = double(Logger)
+ @bot.stub(:logger).and_return(@logger)
end
it "should call logger on debug" do
@bot.should_receive(:logging?).and_return(true)
@logger.should_receive(:debug).with("rspec hi!")
@@ -37,13 +37,13 @@
@bot.config[:db_uri] = @db_uri
@bot.should_receive(:log_tweets?).and_return(true)
@bot.should_receive(:botname).and_return("logger")
- Time.stub!(:now).and_return(123)
+ Time.stub(:now).and_return(123)
- @tweets_table = mock(Object)
- @bot.stub!(:db).and_return({
+ @tweets_table = double(Object)
+ @bot.stub(:db).and_return({
:tweets => @tweets_table
})
end
it "logs tweets to the db" do