Sha256: 1232b00592434b855a478617c0ac9f163e57d94df779dfe5f8bb1078c299da82

Contents?: true

Size: 431 Bytes

Versions: 7

Compression:

Stored size: 431 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/patches/pathname/basename_sub'

RSpec.describe ::Pathname do
  it do
    expect(::Pathname.new('/absolute/path/to/file').basename_sub { |_b| 'other_file' }).to eq(
      ::Pathname.new('/absolute/path/to/other_file')
    )
  end

  it do
    expect(::Pathname.new('file').basename_sub { |b| b.to_s + '_appended' }).to eq(
      ::Pathname.new('file_appended')
    )
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ehbrs-tools-0.11.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb
ehbrs-tools-0.10.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb
ehbrs-tools-0.9.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb
ehbrs-tools-0.7.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb
ehbrs-tools-0.6.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb
ehbrs-tools-0.5.0 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb
ehbrs-tools-0.3.1 vendor/eac_ruby_utils/spec/lib/eac_ruby_utils/patches/pathname/basename_sub_spec.rb