Sha256: 2362213bc9b259af873df00a597c12b27cef03d09f29a91d0d305b906b7d89c9

Contents?: true

Size: 1008 Bytes

Versions: 11

Compression:

Stored size: 1008 Bytes

Contents

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

11 entries across 11 versions & 1 rubygems

Version Path
ridgepole-0.8.0.rc1 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.7 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.6 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.5 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.5.beta3 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.5.beta2 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.5.beta spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.4 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.3 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.3.beta3 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.7.3.beta2 spec/mysql/dump/dump_without_table_options_spec.rb