Sha256: 5b5d598ec20aa966e4201a0b28ed73320b6980720fb39310c1cabac5ed6c29e5

Contents?: true

Size: 644 Bytes

Versions: 40

Compression:

Stored size: 644 Bytes

Contents

require 'lib/spec_helper'
require 'lib/shared/path_finder_shared'
require 'opal/hike_path_finder'

describe Opal::HikePathFinder do
  subject(:path_finder) { described_class.new(root) }
  let(:root) { File.expand_path('..', __FILE__) }
  let(:path) { 'fixtures/opal_file' }
  let(:full_path) { File.join(root, path + ext) }
  let(:ext) { '.rb' }

  include_examples :path_finder

  context 'with absolute paths' do
    it 'returns the path if exists' do
      expect(path_finder.find(full_path)).to eq(full_path)
    end

    it 'gives nil if it is missing' do
      expect(path_finder.find(full_path+'/not-real')).to eq(nil)
    end
  end
end

Version data entries

40 entries across 40 versions & 3 rubygems

Version Path
opal-0.10.6 spec/lib/hike_path_finder_spec.rb
opal-0.10.6.beta spec/lib/hike_path_finder_spec.rb
opal-0.10.5 spec/lib/hike_path_finder_spec.rb
opal-0.10.4 spec/lib/hike_path_finder_spec.rb
opal-0.11.0.rc1 spec/lib/hike_path_finder_spec.rb
opal-0.10.3 spec/lib/hike_path_finder_spec.rb
opal-0.10.2 spec/lib/hike_path_finder_spec.rb
opal-0.10.1 spec/lib/hike_path_finder_spec.rb
opal-0.10.0 spec/lib/hike_path_finder_spec.rb
opal-0.10.0.rc2 spec/lib/hike_path_finder_spec.rb
opal-0.9.4 spec/lib/hike_path_finder_spec.rb
opal-0.9.3 spec/lib/hike_path_finder_spec.rb
opal-0.10.0.rc1 spec/lib/hike_path_finder_spec.rb
opal-0.10.0.beta5 spec/lib/hike_path_finder_spec.rb
opal-0.10.0.beta4 spec/lib/hike_path_finder_spec.rb
opal-0.10.0.beta3 spec/lib/hike_path_finder_spec.rb
opal-0.10.0.beta2 spec/lib/hike_path_finder_spec.rb
opal-0.10.0.beta1 spec/lib/hike_path_finder_spec.rb
opal-0.9.2 spec/lib/hike_path_finder_spec.rb
opal-0.9.0 spec/lib/hike_path_finder_spec.rb