Sha256: e16a52283476b305bdbbc385cb8f0c8686d35680ff71b6d674d3d245639742dc
Contents?: true
Size: 1002 Bytes
Versions: 3
Compression:
Stored size: 1002 Bytes
Contents
describe 'Ridgepole::Client#dump' do let(:actual_dsl) { erbh(<<-'EOS') create_table "books", unsigned: true, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='\"london\" bridge \"is\" falling \"down\"'" do |t| t.string "title", null: false t.integer "author_id", null: false t.datetime "created_at" t.datetime "updated_at" end EOS } context 'when without table options' do let(:expected_dsl) { erbh(<<-EOS) create_table "books", <%= i cond('>= 5.1',id: :bigint) %>, unsigned: true, force: :cascade, comment: "\\"london\\" bridge \\"is\\" falling \\"down\\"" do |t| t.string "title", null: false t.integer "author_id", null: false t.datetime "created_at" t.datetime "updated_at" end EOS } before { subject.diff(actual_dsl).migrate } subject { client } it { expect(subject.dump).to match_ruby expected_dsl } end end
Version data entries
3 entries across 3 versions & 1 rubygems