Sha256: e33016962cc5cd6e2686b17bfe4f5484635cbaa2b6d31786cd796a7a7d18903b

Contents?: true

Size: 969 Bytes

Versions: 4

Compression:

Stored size: 969 Bytes

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.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.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

4 entries across 4 versions & 1 rubygems

Version Path
rail-0.0.5 spec/coffee_spec.rb
rail-0.0.4 spec/coffee_spec.rb
rail-0.0.3 spec/coffee_spec.rb
rail-0.0.2 spec/coffee_spec.rb