Sha256: 998e00331676837769a6e036787f4c5e07458d31b04aa3312dd4ee9c9d403360

Contents?: true

Size: 566 Bytes

Versions: 2

Compression:

Stored size: 566 Bytes

Contents

RSpec.shared_context 'notes' do

  before do
    inferrable_relations.concat %i(notes)
  end

  before do |example|
    ctx = self

    conn.create_table :notes do
      primary_key :id
      foreign_key :user_id, :users
      String :text, null: false
      # TODO: Remove Oracle's workarounds once inferer can infer not-null timestamps
      DateTime :created_at, null: ctx.oracle?(example)
      DateTime :updated_at, null: ctx.oracle?(example)
      DateTime :completed_at
      Date :written
    end

    conf.relation(:notes) { schema(infer: true) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rom-sql-2.0.0.beta2 spec/shared/notes.rb
rom-sql-2.0.0.beta1 spec/shared/notes.rb