Sha256: bfd7d859f3661b06cc298ee4183a7eec6fd0b6493d04fed637a9d0e1bc898e97

Contents?: true

Size: 1.01 KB

Versions: 16

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

describe 'Ridgepole::Client#dump' do
  let(:actual_dsl) do
    erbh(<<-'ERB')
      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
    ERB
  end

  context 'when without table options' do
    let(:expected_dsl) do
      erbh(<<-ERB)
        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
      ERB
    end

    before { subject.diff(actual_dsl).migrate }
    subject { client }

    it {
      expect(subject.dump).to match_ruby expected_dsl
    }
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ridgepole-0.8.13 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.12 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.11 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.10 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.9 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.8 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.7 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.6 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.5 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.4 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.3 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.2 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.1 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.0 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.8.0.rc2 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.8 spec/mysql/dump/dump_without_table_options_spec.rb