Sha256: 885ab9f0c61d2e3d1e475781dfc2535917a6bb9506a1a5676341b7584ecb5642

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

require "teaspoon/framework/base"

module Teaspoon
  module Qunit
    class Framework < Teaspoon::Framework::Base
      # specify the framework name
      framework_name :qunit

      # register standard versions
      versions = ["1.12.0", "1.13.0", "1.14.0", "1.15.0", "1.16.0", "1.17.1", "1.18.0", "1.19.0"]

      versions.each do |version|
        register_version version, "qunit/#{version}.js",
                                  dependencies: ["teaspoon-qunit.js"],
                                  dev_deps: ["teaspoon/qunit.js"]
      end

      # add asset paths
      add_asset_path File.expand_path("../../../teaspoon/qunit/assets", __FILE__)

      # add custom install templates
      add_template_path File.expand_path("../../../teaspoon/qunit/templates", __FILE__)

      # specify where to install, and add installation steps.
      install_to "test" do
        ext = options[:coffee] ? ".coffee" : ".js"
        copy_file "test_helper#{ext}", "test/javascripts/test_helper#{ext}"
      end

      def self.modify_config(config)
        config.matcher = "{test/javascripts,app/assets}/**/*_test.{js,js.coffee,coffee}"
        config.helper  = "test_helper"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
teaspoon-qunit-1.19.0 lib/teaspoon/qunit/framework.rb