Sha256: 160177021fc45f211cffcda31978d59c39b42eab8fa67a12b1f32056f8f1b6fd

Contents?: true

Size: 999 Bytes

Versions: 32

Compression:

Stored size: 999 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_fuzzy expected_dsl
    }
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
ridgepole-0.7.1 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.1.beta5 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.1.beta4 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.1.beta3 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.1.beta2 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.1.beta spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.rc1 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta22 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta21 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta20 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta19 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta18 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta17 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta16 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta15 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta14 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta13 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta12 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.0.beta11 spec/mysql/dump/dump_without_table_options_spec.rb