Sha256: d0fc55bd87d709218db6066d478d647e111aae2adc94e379c0cdb6df218dd7f9

Contents?: true

Size: 803 Bytes

Versions: 3

Compression:

Stored size: 803 Bytes

Contents

<%= javascript_include_tag_for_teaspoon *@suite.helper, @javascript_options %>
<script type="text/javascript">
  // When the DOM is loaded, we then use require to include currently selected file/suite, then once those are all loaded, we run Teaspoon
  // @suite.spec_javascripts_for_require strips off the .js file extension
  Teaspoon.onWindowLoad(function () {
    // setup the Teaspoon path prefix to load /assets
    require.config(
      <% if Rails.application.config.respond_to?(:requirejs) %>
        <%=raw Rails.application.config.requirejs.user_config.merge({baseUrl: '/assets'}).to_json %>
      <% else %>
        {baseUrl: '/assets'}
      <% end %>
    );

    require(<%=raw @suite.spec_javascripts_for_require.to_json %>, function () {
      Teaspoon.execute();
    });
  });
</script>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
teaspoon-0.7.7 app/views/teaspoon/spec/_require_js.html.erb
teaspoon-0.7.6 app/views/teaspoon/spec/_require_js.html.erb
teaspoon-0.7.5 app/views/teaspoon/spec/_require_js.html.erb