Sha256: 9523b80ab34603dacc08b3de6677d5c506848c71c4b3f4681e29b4b57adc82af
Contents?: true
Size: 1.18 KB
Versions: 2
Compression:
Stored size: 1.18 KB
Contents
require 'minitest/spec' require 'minitest/autorun' require_relative 'project/controller' describe Rail::Application do it 'handles uncompressed CoffeeScript assets' do controller = Controller.new do config.compress = false end body = controller.process('/application.js') assert_equal body.strip, <<-BODY.strip (function() { window.Parser = (function() { function Parser(format) { this.format = format; } return Parser; })(); }).call(this); (function() { window.Font = (function() { function Font(name) { this.name = name; } return Font; })(); }).call(this); (function() { var font; font = new Font('Benton Modern Display'); }).call(this); BODY end it 'handles compressed CoffeeScript assets' do controller = Controller.new do config.compress = true end body = controller.process('/application.js') assert_equal body.strip, <<-BODY.strip (function(){window.Parser=function(){function n(n){this.format=n}return n}()}).call(this),function(){window.Font=function(){function n(n){this.name=n}return n}()}.call(this),function(){var n;n=new Font(\"Benton Modern Display\")}.call(this); BODY end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rail-0.0.7 | spec/coffee_spec.rb |
rail-0.0.6 | spec/coffee_spec.rb |