Sha256: cdaadde3fdea495ee9295ae28f145de4189e79a31ecf95404a1327862c906595

Contents?: true

Size: 476 Bytes

Versions: 9

Compression:

Stored size: 476 Bytes

Contents

require 'spec_helper'

describe 'Association errors' do
  include_context 'users and tasks'

  describe 'accessing an undefined association' do
    specify do
      setup.relation(:users) do
        def with_undefined
          association_join(:undefined)
        end
      end

      expect {
        rom.relations.users.with_undefined
      }.to raise_error ROM::SQL::NoAssociationError, 'Association :undefined has not been defined for relation :users'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rom-sql-0.6.1 spec/unit/association_errors_spec.rb
rom-sql-0.6.0 spec/unit/association_errors_spec.rb
rom-sql-0.6.0.rc1 spec/unit/association_errors_spec.rb
rom-sql-0.6.0.beta1 spec/unit/association_errors_spec.rb
rom-sql-0.5.3 spec/unit/association_errors_spec.rb
rom-sql-0.5.2 spec/unit/association_errors_spec.rb
rom-sql-0.5.1 spec/unit/association_errors_spec.rb
rom-sql-0.5.0 spec/unit/association_errors_spec.rb
rom-sql-0.4.3 spec/unit/association_errors_spec.rb