Sha256: bfa5be2996d2f5f9649bd86235baf387b32bf04c2e1bafd570d50cb2c02726e1

Contents?: true

Size: 521 Bytes

Versions: 4

Compression:

Stored size: 521 Bytes

Contents

require 'spec_helper'

describe ROM::Repository do
  include_context 'users and tasks'

  subject(:repository) { rom.memory }

  before { setup.relation(:users) }

  it 'exposes datasets on method-missing' do
    expect(repository.users).to be(rom.memory[:users])
  end

  it 'responds to methods corresponding to dataset names' do
    expect(repository).to respond_to(:users)
  end

  it 'raises exception when unknown dataset is referenced' do
    expect { repository.not_here }.to raise_error(NoMethodError)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rom-0.5.0 spec/unit/rom/repository_spec.rb
rom-0.4.2 spec/unit/rom/repository_spec.rb
rom-0.4.1 spec/unit/rom/repository_spec.rb
rom-0.4.0 spec/unit/rom/repository_spec.rb