Sha256: 2b82593df58ba94121db44227b0362a3cbaa9c53588893f4fcd0cb8edf0caf24

Contents?: true

Size: 536 Bytes

Versions: 7

Compression:

Stored size: 536 Bytes

Contents

require 'pathname'
require_relative '../lib/inline_svg'

describe InlineSvg::FindsAssetPaths do
  it "returns fully qualified file paths from Sprockets" do
    sprockets = double('SprocketsDouble')

    expect(sprockets).to receive(:find_asset).with('some-file').
      and_return(double(pathname: Pathname('/full/path/to/some-file')))

    InlineSvg.configure do |config|
      config.asset_finder = sprockets
    end

    expect(InlineSvg::FindsAssetPaths.by_filename('some-file')).to eq Pathname('/full/path/to/some-file')
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
inline_svg-0.9.1 spec/finds_asset_paths_spec.rb
inline_svg-0.9.0 spec/finds_asset_paths_spec.rb
inline_svg-0.8.0 spec/finds_asset_paths_spec.rb
inline_svg-0.7.0 spec/finds_asset_paths_spec.rb
inline_svg-0.6.4 spec/finds_asset_paths_spec.rb
inline_svg-0.6.3 spec/finds_asset_paths_spec.rb
inline_svg-0.6.2 spec/finds_asset_paths_spec.rb