Sha256: fddc250dface95cf449c14688b08a40021c93f9b3a51d80fde480b27273cd0b3
Contents?: true
Size: 961 Bytes
Versions: 1
Compression:
Stored size: 961 Bytes
Contents
# frozen_string_literal: true require 'rom/files/dataset' require 'shared/rom/files/media_dataset' RSpec.describe ROM::Files::Dataset, '#select' do include_context 'media dataset' context '(simple_pattern)' do subject { dataset.select('*.txt') } its(:include_patterns) { is_expected.to eq %w[*.txt] } end context '(multiple, patterns)' do subject { dataset.select('*.txt', '*.md') } its(:include_patterns) { is_expected.to eq %w[*.txt *.md] } end context '(multiple, duplicated patterns)' do subject { dataset.select('*.txt', '*.md', '*.txt') } its(:include_patterns) { is_expected.to eq %w[*.txt *.md] } end context '(glob_pattern)' do subject { dataset.select('*.{txt,md}') } its(:include_patterns) { is_expected.to eq %w[*.{txt,md}] } end context '(ordered_glob_pattern)' do subject { dataset.select('*.{md,txt}') } its(:include_patterns) { is_expected.to eq %w[*.{md,txt}] } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rom-files-0.2.0 | spec/lib/rom/files/dataset/select_spec.rb |