Sha256: 6b58fca41e8c10426c86dca3ac27f5bfede0da8bcf567b7cad249b6864d2d05d

Contents?: true

Size: 928 Bytes

Versions: 1

Compression:

Stored size: 928 Bytes

Contents

require 'spec_helper'

class Post < ActiveRecord::Base
end

describe SlimAssets do
  it "should have the proper format" do
    print RailsApp::Application.assets['link_to.jst.ejs.slim']
    RailsApp::Application.assets['link_to.jst.ejs.slim'].to_s.should eq "(function() {\n  this.JST || (this.JST = {});\n  this.JST[\"link_to\"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('h1\\n  .text Render works\\n\\n');}return __p.join('');};\n}).call(this);\n"
  end

  it "should use rails helpers" do
    RailsApp::Application.assets['helpers.jst.ejs.slim'].to_s.should == "(function() {\n  this.JST || (this.JST = {});\n  this.JST[\"helpers\"] = function(obj){var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('h1 Form\\n= form_for Post.new, url: \\'/\\' do |f|\\n  = f.text_field :title\\n');}return __p.join('');};\n}).call(this);\n"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slim_assets-0.0.3 spec/render_spec.rb