Sha256: f8496ab1d25ba208392be1e3e3c377145d48d8a0dbfc163e66196eadc39f34ed
Contents?: true
Size: 582 Bytes
Versions: 19
Compression:
Stored size: 582 Bytes
Contents
require 'spec_helper' RSpec.describe 'Filesystem Api' do include_context 'uses aruba API' def expand_path(*args) @aruba.expand_path(*args) end describe '#file_size' do let(:name) { @file_name } let(:path) { @file_path } let(:size) { file_size(name) } context 'when file exist' do before :each do File.open(path, 'w') { |f| f.print 'a' } end it { expect(size).to eq 1 } end context 'when file does not exist' do let(:name) { 'non_existing_file' } it { expect { size }.to raise_error } end end end
Version data entries
19 entries across 19 versions & 2 rubygems