Sha256: 61683dd5e7a6376b844035a2602c5af6b6419b3d63dbb13a6ffc499d7fbd647e

Contents?: true

Size: 417 Bytes

Versions: 7

Compression:

Stored size: 417 Bytes

Contents

require File.expand_path('../helper', __FILE__)

class TestRakeFileListPathMap < Rake::TestCase
  def test_file_list_supports_pathmap
    assert_equal ['a', 'b'], FileList['dir/a.rb', 'dir/b.rb'].pathmap("%n")
  end

  def test_file_list_supports_pathmap_with_a_block
    mapped = FileList['dir/a.rb', 'dir/b.rb'].pathmap("%{.*,*}n") do |name|
      name.upcase
    end
    assert_equal ['A', 'B'], mapped
  end
end

Version data entries

7 entries across 7 versions & 4 rubygems

Version Path
windows-pr-1.2.5 vendor/bundle/ruby/2.2.0/gems/win32-api-1.6.0-universal-mingw32/vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list_path_map.rb
win32-api-1.6.0-universal-mingw32 vendor/bundle/ruby/2.2.0/gems/rake-11.1.2/test/test_rake_file_list_path_map.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/rake-11.1.2/test/test_rake_file_list_path_map.rb
rake-11.1.2 test/test_rake_file_list_path_map.rb
rake-11.1.1 test/test_rake_file_list_path_map.rb
rake-11.1.0 test/test_rake_file_list_path_map.rb
rake-11.0.1 test/test_rake_file_list_path_map.rb