Sha256: 943fdd166b6c9f7239ed0f5f7fce57386e27bbf5216eafbbb93024ace56bd5a9
Contents?: true
Size: 916 Bytes
Versions: 2
Compression:
Stored size: 916 Bytes
Contents
describe 'schema table in database' do it 'should be created if it does not exist' do expect do @database = SqlMigrations::Database.new(name: :default, 'adapter' => :sqlite) end.to output("[+] Connected to database using sqlite adapter\n" + "[!] Installing `sqlmigrations_schema`\n").to_stdout expect(@database.db.table_exists?(:sqlmigrations_schema)).to be true end it 'should not be create if it exists' do @sqlite_db.create_table(:sqlmigrations_schema) do primary_key :id Bignum :time DateTime :executed String :name String :type index [ :time, :type ] end expect do @database = SqlMigrations::Database.new(name: :default, 'adapter' => :sqlite) end.to output("[+] Connected to database using sqlite adapter\n").to_stdout expect(@database.db.table_exists?(:sqlmigrations_schema)).to be true end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sql_migrations-2.0.0 | spec/features/schema_table_spec.rb |
sql_migrations-1.1.0 | spec/features/schema_table_spec.rb |