File: migration.rb

package info (click to toggle)
ruby-data-migrate 6.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 568 kB
  • sloc: ruby: 1,844; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'spec_helper'

if Rails::VERSION::MAJOR >= 5
  subject = DataMigrate::MigrationFive
else
  subject = DataMigrate::Migration
end

describe subject do
  it "uses correct table name" do
    expect(subject.table_name).to eq("data_migrations")
  end

  it "uses correct index name" do
    expect(subject).to receive(:table_name_prefix) { "" }
    expect(subject).to receive(:table_name_suffix) { "" }
    expect(subject.primary_key).to eq("version")
  end
end