Sha256: 1e920d31564a56b32b5da268a2148c931ff430fd422e4cbc0fb3982ec34b0ed4

Contents?: true

Size: 576 Bytes

Versions: 5

Compression:

Stored size: 576 Bytes

Contents

require 'spec_helper'

describe Jasmine::AssetPipelineMapper do
  it "expands asset paths if available" do
    expander = lambda do |dir, path|
      if dir == "/some_location/" && path == 'asset1'
        ['asset1', 'asset2']
      elsif dir == "/some_location/" && path == 'asset2'
        ['asset1', 'asset3']
      end

    end
    config = double(:config, :src_dir => "/some_location/")

    mapper = Jasmine::AssetPipelineMapper.new(config, expander)

    mapper.map_src_paths(['asset1', 'asset2', 'asset4']).should == ['asset1', 'asset2', 'asset3', 'asset4']
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
jasmine-2.0.0.rc2 spec/asset_pipeline_mapper_spec.rb
jasmine-multi_json-1.3.2.1 spec/asset_pipeline_mapper_spec.rb
jasmine-1.3.2 spec/asset_pipeline_mapper_spec.rb
jasmine-multi_json-1.3.1.1 spec/asset_pipeline_mapper_spec.rb
jasmine-1.3.1 spec/asset_pipeline_mapper_spec.rb