Sha256: 89ca1b64994e0c50f9b209e65bc0ebfdf9ac0677a8ca7584d8fbf76b253e8825

Contents?: true

Size: 694 Bytes

Versions: 11

Compression:

Stored size: 694 Bytes

Contents

require 'spec_helper'

class Rails32ResolverTest
  include Trackman::Assets::Components::Rails32PathResolver
end

describe Trackman::Assets::Components::Rails32PathResolver do  
  Rails32PathResolver = Trackman::Assets::Components::Rails32PathResolver
  before :all do
    @test = Rails32ResolverTest.new
  end

  it "does not throw when sprockets throws a FileNotFound" do
    sprocket = double "SprocketEnvironment"
    sprocket.stub(:resolve).and_raise(Sprockets::FileNotFound)
    
    @test.stub(:prepare_for_sprocket).and_return('some/path')
    @test.stub(:sprockets).and_return(sprocket)

    lambda { @test.translate 'some/path', 'path/to/my/parent' }.should_not raise_error
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
trackman-0.5.4 spec/rails32_path_resolver_spec.rb
trackman-0.5.3 spec/rails32_path_resolver_spec.rb
trackman-0.5.2 spec/rails32_path_resolver_spec.rb
trackman-0.5.1 spec/rails32_path_resolver_spec.rb
trackman-0.5.0 spec/rails32_path_resolver_spec.rb
trackman-0.4.8 spec/rails32_path_resolver_spec.rb
trackman-0.4.7 spec/rails32_path_resolver_spec.rb
trackman-0.4.6 spec/rails32_path_resolver_spec.rb
trackman-0.4.5 spec/rails32_path_resolver_spec.rb
trackman-0.4.4 spec/rails32_path_resolver_spec.rb
trackman-0.4.3 spec/rails32_path_resolver_spec.rb