Sha256: ee01c914c6dbe9f2fd213f9eb26730f5c8d0b11e6658ddd7fd18d3afd644decd

Contents?: true

Size: 515 Bytes

Versions: 13

Compression:

Stored size: 515 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
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rom-sql-1.3.5 spec/shared/notes.rb
rom-sql-1.3.4 spec/shared/notes.rb
rom-sql-1.3.3 spec/shared/notes.rb
rom-sql-1.3.2 spec/shared/notes.rb
rom-sql-1.3.1 spec/shared/notes.rb
rom-sql-1.3.0 spec/shared/notes.rb
rom-sql-1.2.2 spec/shared/notes.rb
rom-sql-1.2.1 spec/shared/notes.rb
rom-sql-1.2.0 spec/shared/notes.rb
rom-sql-1.1.2 spec/shared/notes.rb
rom-sql-1.1.1 spec/shared/notes.rb
rom-sql-1.1.0 spec/shared/notes.rb
rom-sql-1.0.3 spec/shared/notes.rb