Sha256: 66f82c56ca0faf43583c53aec4a05b96e9cf2e10b85b7dc0bff78eec01441f1b
Contents?: true
Size: 722 Bytes
Versions: 1
Compression:
Stored size: 722 Bytes
Contents
# frozen_string_literal: true require 'pathname/extensions' RSpec.describe Pathname do before { described_class.load_extensions :partial } describe '#partial' do specify { expect(Pathname('1/2/file').partial(1)).to eq Pathname('1') } specify { expect(Pathname('1/2/file').partial(2)).to eq Pathname('1/2') } specify { expect(Pathname('1/2/file').partial(3)).to eq Pathname('1/2') } specify { expect(Pathname('1/2/file').partial(0)).to eq Pathname('.') } specify { expect(Pathname('1/2/file').partial(-1)).to eq Pathname('2') } specify { expect(Pathname('1/2/file').partial(-2)).to eq Pathname('1/2') } specify { expect(Pathname('1/2/file').partial(-3)).to eq Pathname('1/2') } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rom-files-0.2.0 | spec/lib/pathname/extensions/partial_spec.rb |