Sha256: 8ed53fea47acdbff61f7d99f7ac090c5de71f3d0877d509c4db7dd4025522453

Contents?: true

Size: 1.29 KB

Versions: 25

Compression:

Stored size: 1.29 KB

Contents

unless postgresql?
if mysql_awesome_enabled?
  describe 'Ridgepole::Client#dump' do
    let(:actual_dsl) {
      <<-'RUBY'
        create_table "books", unsigned: true, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='\"london\" bridge \"is\" falling \"down\"'" do |t|
          t.string   "title",      limit: 255, null: false
          t.integer  "author_id",  limit: 4,   null: false
          t.datetime "created_at"
          t.datetime "updated_at"
        end
      RUBY
    }

    context 'when without table options' do
      let(:expected_dsl) {
        <<-RUBY
          create_table "books", unsigned: true, force: :cascade do |t|
            t.string   "title",      limit: 255, null: false
            t.integer  "author_id",  limit: 4,   null: false
            t.datetime "created_at"
            t.datetime "updated_at"
          end
        RUBY
      }

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

      it {
        expect(subject.dump).to eq expected_dsl.strip_heredoc.strip
      }
    end

    context 'when with table options' do
      before { subject.diff(actual_dsl).migrate }
      subject { client(dump_without_table_options: false) }

      it {
        expect(subject.dump).to eq actual_dsl.strip_heredoc.strip
      }
    end
  end
end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
ridgepole-0.6.4 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.4.beta9 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.4.beta8 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.4.beta7 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.4.beta6 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.4.beta5 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.4.beta4 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.4.beta3 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.4.beta2 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.4.beta spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.3 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.3.beta5 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.3.beta4 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.3.beta3 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.3.beta2 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.3.beta spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.2 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.2.beta spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.1 spec/mysql/dump/dump_without_table_options_spec.rb
ridgepole-0.6.1.beta2 spec/mysql/dump/dump_without_table_options_spec.rb