Sha256: 2287d6f0d4708824cc5a4ffe51a9a63a8ab3edca6a3022d9413b23fba4b54192

Contents?: true

Size: 514 Bytes

Versions: 11

Compression:

Stored size: 514 Bytes

Contents

require 'spec_helper'

describe Quby::LookupTableRepo::Disk do
  subject { Quby.lookup_table_repo }

  it 'Quby.lookup_table_repo is a disk repo by default' do
    expect(subject).to be_an_instance_of(described_class)
  end

  describe '#retrieve' do
    it 'reads the csv file' do
      expect(CSV).to receive(:read).and_call_original
      subject.retrieve 'test'
    end

    it 'fails when csv file is not found' do
      expect { subject.retrieve 'not_there' }.to raise_error(Errno::ENOENT)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
quby-4.0.4 spec/quby/lookup_table_repo_spec.rb
quby-5.0.0.pre2 spec/quby/lookup_table_repo_spec.rb
quby-5.0.0.pre1 spec/quby/lookup_table_repo_spec.rb
quby-4.0.3 spec/quby/lookup_table_repo_spec.rb
quby-4.0.2 spec/quby/lookup_table_repo_spec.rb
quby-4.0.1 spec/quby/lookup_table_repo_spec.rb
quby-4.0.0 spec/quby/lookup_table_repo_spec.rb
quby-3.2.2 spec/quby/lookup_table_repo_spec.rb
quby-3.2.1 spec/quby/lookup_table_repo_spec.rb
quby-3.2.0 spec/quby/lookup_table_repo_spec.rb
quby-3.2.0.pre.pre1 spec/quby/lookup_table_repo_spec.rb