Sha256: d6b395b5d6b35297b1c1bd7bf6cc7763e20e52114e335811961c6632fb434aa6
Contents?: true
Size: 705 Bytes
Versions: 9
Compression:
Stored size: 705 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe LB::Project, '.root_for' do subject { object.root_for(*args) } let(:args) { [file] } let(:object) { described_class } let(:file) { __FILE__ } let(:expected) { File.dirname(File.dirname(File.expand_path(file))) } it 'should equal the absolute parent path (two directory levels up)' do expect(subject).to eql(expected) end context 'with depth of 3' do let(:args) { [file, 3] } let(:expected) do File.dirname(File.dirname(File.dirname(File.expand_path(file)))) end it 'should equal the absolute parent path (two directory levels up)' do expect(subject).to eql(expected) end end end
Version data entries
9 entries across 9 versions & 1 rubygems