Merge branch 'duck-punch-sprockets'

This commit is contained in:
John Bintz 2011-06-17 09:40:59 -04:00
commit cff6891a8d
3 changed files with 31 additions and 2 deletions

View File

@ -1,5 +1,5 @@
if !jasmine? if !jasmine?
throw new Exception("jasmine not laoded!") throw new Error("jasmine not laoded!")
class HeadlessReporterResult class HeadlessReporterResult
constructor: (name) -> constructor: (name) ->

View File

@ -2,7 +2,7 @@
var HeadlessReporterResult; var HeadlessReporterResult;
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
if (!(typeof jasmine !== "undefined" && jasmine !== null)) { if (!(typeof jasmine !== "undefined" && jasmine !== null)) {
throw new Exception("jasmine not laoded!"); throw new Error("jasmine not laoded!");
} }
HeadlessReporterResult = (function() { HeadlessReporterResult = (function() {
function HeadlessReporterResult(name) { function HeadlessReporterResult(name) {

View File

@ -1,5 +1,25 @@
require 'jasmine/headless/task' require 'jasmine/headless/task'
module Digest
class JasmineTest
def self.file(file)
new
end
def file(file)
self
end
def hexdigest
'test'
end
def update(prefix)
self
end
end
end
module Jasmine module Jasmine
module Headless module Headless
class Railtie < Rails::Railtie class Railtie < Rails::Railtie
@ -7,6 +27,15 @@ module Jasmine
Jasmine::Headless::Task.new do |t| Jasmine::Headless::Task.new do |t|
t.colors = true t.colors = true
end end
if Rails.version >= "3.1.0"
desc 'Force generate static assets without an MD5 hash, all assets end with -test.<ext>'
task 'assets:precompile:for_testing' => :environment do
Rails.application.assets.digest_class = Digest::JasmineTest
Rake::Task['assets:precompile'].invoke
end
end
end end
end end
end end