Sha256: 625c8f7b8afa357d22fbb63e90705fbf02e063b68412980c8fef6e4074cf8448

Contents?: true

Size: 487 Bytes

Versions: 5

Compression:

Stored size: 487 Bytes

Contents

module RSpec
  module Core
    module Formatters
      # @private
      class SnippetExtractor
        def self.source_from_file(path)
          # Don't check for file existence, we may still have its embedded source
          # raise NoSuchFileError unless File.exist?(path)
          RSpec.world.source_from_file(path)
        rescue Errno::ENOENT, Errno::ENAMETOOLONG
          # But if we really don't, well...
          raise NoSuchFileError
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opal-rspec-1.1.0.alpha3 lib-opal/opal/rspec/fixes/rspec/core/formatters/snippet_extractor.rb
opal-rspec-1.1.0.alpha2 lib-opal/opal/rspec/fixes/rspec/core/formatters/snippet_extractor.rb
opal-rspec-1.1.0.alpha1 lib-opal/opal/rspec/fixes/rspec/core/formatters/snippet_extractor.rb
opal-rspec-1.0.0 lib-opal/opal/rspec/fixes/rspec/core/formatters/snippet_extractor.rb
opal-rspec-1.0.0.alpha1 lib-opal/opal/rspec/fixes/rspec/core/formatters/snippet_extractor.rb