spec/db_spec.rb in chatterbot-0.2.9 vs spec/db_spec.rb in chatterbot-0.3.0
- old
+ new
@@ -8,9 +8,17 @@
@db_uri = "sqlite://#{@db_tmp.path}"
@bot = Chatterbot::Bot.new
@bot.config[:db_uri] = @db_uri
end
+
+ describe "get_connection" do
+ it "should make sure sequel is actually installed" do
+ @bot.stub!(:has_sequel?).and_return(false)
+ @bot.should_receive(:display_db_config_notice)
+ @bot.db
+ end
+ end
describe "table creation" do
[:blacklist, :tweets, :config].each do |table|
it "should create table #{table}" do
@bot.db