Sha256: 982a6f3d4c1bcdadac4f06fd1da4cd49e68bb3e801f7e04865c898b9b5c8bc52
Contents?: true
Size: 706 Bytes
Versions: 14
Compression:
Stored size: 706 Bytes
Contents
shared_examples_for "a baza importer driver" do let(:driver) { constant.new(debug: false) } let(:db) { driver.db } let(:test_table) do db.tables.create( "test", columns: [ {name: "id", type: :int, autoincr: true, primarykey: true}, {name: "text", type: :varchar} ] ) db.tables[:test] end before do driver.before end after do driver.after end it "imports sql" do test_table io = StringIO.new dumper = Baza::Dump.new(db: db) dumper.dump(io) io.rewind test_table.drop importer = Baza::Commands::Importer.new(db: db, io: io) importer.execute expect(db.tables[:test].name).to eq "test" end end
Version data entries
14 entries across 14 versions & 1 rubygems