Sha256: 60b0e1a43d2091303f1465d0e480c09f1c511cc6fd5b21b3cb419d53ef31b327
Contents?: true
Size: 792 Bytes
Versions: 10
Compression:
Stored size: 792 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'sequel' describe "Chatterbot::DB" do before(:each) do @db_tmp = Tempfile.new("config.db") @db_uri = "sqlite://#{@db_tmp.path}" @bot = Chatterbot::Bot.new @bot.config[:db_uri] = @db_uri end describe "table creation" do [:blacklist, :tweets, :config].each do |table| it "should create table #{table}" do @bot.db @tmp_conn = Sequel.connect(@db_uri) @tmp_conn.tables.include?(table).should == true end end end describe "store_database_config" do it "doesn't fail" do @bot = Chatterbot::Bot.new @bot.config[:db_uri] = @db_uri @bot.db @bot.store_database_config.should == true end end end
Version data entries
10 entries across 10 versions & 1 rubygems