Sha256: fdb75bbb978b9558ebe6fc1fb10f9066297c940a63b4c6cadee37427b191eb6e

Contents?: true

Size: 775 Bytes

Versions: 15

Compression:

Stored size: 775 Bytes

Contents

<%
rails_config = Rails.application.config
require_options = {baseUrl: rails_config.assets.prefix}
require_options.merge!(urlArgs: "instrument=1", waitSeconds: 0) if Teaspoon.configuration.use_coverage
require_options.merge!(rails_config.requirejs.user_config) if rails_config.respond_to?(:requirejs)
specs = @suite.spec_assets(false).map{ |s| "#{s.gsub(/\.js.*$/, "")}" }
%>

<%= javascript_include_tag @suite.helper %>
<script type="text/javascript">
  Teaspoon.onWindowLoad(function () {
    // setup the Teaspoon path prefix to load /assets
    require.config(<%= require_options.to_json.html_safe %>);

    // require specs by striping off the .js file extension
    require(<%= specs.to_json.html_safe %>, function() {
      Teaspoon.execute();
    });
  });
</script>

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
teaspoon-1.4.0 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.2.2 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.2.1 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.2.0 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.1.5 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.1.4 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.1.3 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.1.2 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.1.1 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.1.0 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.0.2 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.0.1 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-1.0.0 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-0.9.1 app/views/teaspoon/suite/_boot_require_js.html.erb
teaspoon-0.9.0 app/views/teaspoon/suite/_boot_require_js.html.erb