Sha256: 283009d9334877b64808b24223e04607aa15da3fcadbebc656c88cad050da119

Contents?: true

Size: 1.65 KB

Versions: 1

Compression:

Stored size: 1.65 KB

Contents

require 'test_helper'

class EngineTest < ActionDispatch::IntegrationTest
  test 'app/assets/javascripts is not in asset load path' do
    refute Rails.application.config.assets.paths.include?(File.join(Rails.root, 'app/assets/javascripts'))
  end

  test 'config/serializers is added to autoload_path' do
    assert Rails.application.config.paths.eager_load.include?(File.join(Rails.root, 'config/serializers'))
  end

  test 'app is in the asset load path' do
    assert Rails.application.config.assets.paths.include?(File.join(Rails.root, 'app'))
  end

  test 'config is in the asset load path' do
    assert Rails.application.config.assets.paths.include?(File.join(Rails.root, 'config'))
  end

  test 'lib is in the asset load path' do
    assert Rails.application.config.assets.paths.include?(File.join(Rails.root, 'lib'))
  end

  test 'lib/assets/javascripts is not in the asset load path' do
    refute Rails.application.config.assets.paths.include?(File.join(Rails.root, 'lib/assets/javascripts'))
  end

  test 'ember source assets come after vendor/assets/javascripts' do
    vendor_index = Rails.application.config.assets.paths.index(File.join(Rails.root, 'vendor/assets/javascripts'))
    ember_source_index = Rails.application.config.assets.paths.index { |path| path =~ /ember-source/ }
    ember_data_source_index = Rails.application.config.assets.paths.index { |path| path =~ /ember-data-source/ }
    handlebars_source_index = Rails.application.config.assets.paths.index { |path| path =~ /handlebars-source/ }

    assert vendor_index < ember_source_index
    assert vendor_index < ember_data_source_index
    assert vendor_index < handlebars_source_index
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ember-appkit-rails-0.5.0 test/integration/engine_test.rb