Sha256: 6d5eb1ee2dcf735e97967e918c86365b8515d7f916ce32b5ea52d1e6e9b23034
Contents?: true
Size: 677 Bytes
Versions: 19
Compression:
Stored size: 677 Bytes
Contents
RSpec.describe Gorynich::Fetchers::File do let(:file_path) { "#{RSPEC_ROOT}/fixtures/fetchers/file_config.yml" } subject { described_class.new(file_path: file_path) } context '#file_path' do it do expect(subject.file_path).to eq(file_path) end end context '#fetch' do describe 'when file not exists' do let(:file_path) { Faker::Lorem.word } it do expect { subject.fetch }.to raise_error(Errno::ENOENT) end end describe 'when file exists' do it do result = subject.fetch expect(result.class).to eq(Hash) expect(result).to include('development', 'test') end end end end
Version data entries
19 entries across 19 versions & 1 rubygems