Sha256: 3c26096e2a6e1e602e1eeacf6a16c27992e0b8d6663a5f9b2b1cf48ba8393d08
Contents?: true
Size: 828 Bytes
Versions: 17
Compression:
Stored size: 828 Bytes
Contents
require 'spec_helper' # Below the helpers expected from a spec that # includes these shared examples: # # @object [PathReader] path_reader the object under test # @method [String] path the path we want to read # @method [String] contents the contents we expect to be read # shared_examples :path_reader do describe '#paths' do it 'is an Enumberable' do expect(path_reader.paths).to be_an(Enumerable) end it 'includes Opal.paths' do paths = path_reader.paths.to_a Opal.paths.each { |path| expect(paths).to include(path) } end end describe '#read' do it 'responds to #path' do expect(path_reader.read(path)).to eq(contents) end it 'returns nil if the file is missing' do expect(path_reader.read('unexpected-path!')).to be_nil end end end
Version data entries
17 entries across 17 versions & 1 rubygems