Sha256: 8d4e0dd8a9037c12846255b7c4b377d0285ac332e9aa3b3e4ef810d1b4b1f03e

Contents?: true

Size: 930 Bytes

Versions: 14

Compression:

Stored size: 930 Bytes

Contents

require 'spec_helper'

describe Jasmine::SprocketsMapper do
  describe "mapping files" do
    it "should retrieve asset paths from the the sprockets environment for passed files" do
      src_files = ["assets/application.js", "assets/other_manifest.js"]
      asset1 = double("asset1", :logical_path => "asset1.js")
      asset2 = double("asset2", :logical_path => "asset2.js")
      asset3 = double("asset3", :logical_path => "asset3.js")
      asset_context = double("Sprockets::Environment")
      asset_context.stub_chain(:find_asset).with("application").and_return([asset1, asset2])
      asset_context.stub_chain(:find_asset).with("other_manifest").and_return([asset1, asset3])
      mapper = Jasmine::SprocketsMapper.new(asset_context, 'some_location')
      mapper.files(src_files).should == ['some_location/asset1.js?body=true', 'some_location/asset2.js?body=true', 'some_location/asset3.js?body=true']
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
rally-jasmine-1.2.0.18 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.12 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.11 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.10 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.8 spec/sprockets_mapper_spec.rb
jasmine-1.3.0 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.7 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.6 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.5 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.4 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.3 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.2 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0.1 spec/sprockets_mapper_spec.rb
rally-jasmine-1.2.0 spec/sprockets_mapper_spec.rb