Sha256: bb1acfc7eca9322569ff628e85f54bc7c893830979208e2b421e0bade53c097d

Contents?: true

Size: 708 Bytes

Versions: 10

Compression:

Stored size: 708 Bytes

Contents

require 'lib/spec_helper'
require 'lib/shared/path_reader_shared'
require 'lib/shared/path_finder_shared'
require 'opal/path_reader'


describe Opal::PathReader do
  subject(:file_reader) { described_class.new(path_finder) }
  let(:path_finder) { double('path_finder') }
  let(:path) { 'opal_file' }
  let(:full_path) { File.expand_path('../fixtures/opal_file.rb', __FILE__) }
  let(:contents) { File.read(full_path) }

  before do
    path_finder.stub(:find) {|path| nil}
    path_finder.stub(:find).with(path).and_return(full_path)
    path_finder.stub(:paths).and_return(Opal.paths)
  end

  include_examples :path_finder
  include_examples :path_reader do
    let(:path_reader) { file_reader }
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
opal-0.8.0.beta1 spec/lib/path_reader_spec.rb
opal-0.7.2 spec/lib/path_reader_spec.rb
opal-0.7.1 spec/lib/path_reader_spec.rb
opal-0.7.0 spec/lib/path_reader_spec.rb
opal-0.7.0.rc1 spec/lib/path_reader_spec.rb
opal-0.7.0.beta3 spec/lib/path_reader_spec.rb
opal-0.7.0.beta2 spec/lib/path_reader_spec.rb
opal-cj-0.7.0.beta2 spec/lib/path_reader_spec.rb
opal-cj-0.7.0.beta1 spec/lib/path_reader_spec.rb
opal-0.7.0.beta1 spec/lib/path_reader_spec.rb