Sha256: 51ee9e06a59111f2451e802c7f087a54576ab5b6e3a7bff8023bd1574bf5e9e1
Contents?: true
Size: 565 Bytes
Versions: 1
Compression:
Stored size: 565 Bytes
Contents
# frozen_string_literal: true require 'rom/files/relation' require 'shared/rom/files/media_relation' RSpec.describe ROM::Files::Relation, '#pluck' do include_context 'media relation' context 'with method name' do subject { relation.pluck(:basename) } it { is_expected.to eql([Pathname('some_image.png'), Pathname('some_file.txt'), Pathname('some_markdown.md')]) } end context 'with block' do subject { relation.pluck { |path| path.basename.to_s } } it { is_expected.to eql %w[some_image.png some_file.txt some_markdown.md] } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rom-files-0.2.0 | spec/lib/rom/files/relation/pluck_spec.rb |