Sha256: 2cb021c571986b8c5832c76671f00bb982524577c31d6bea712ce34b37933f88

Contents?: true

Size: 793 Bytes

Versions: 24

Compression:

Stored size: 793 Bytes

Contents

require "lib/builders/spec_helper"

describe SC::Builder::Handlebars do

  include SC::SpecHelpers
  include SC::BuilderSpecHelper

  before do
    std_before :handlebars_test

    # add fake image entry for sc_static tests..
    @manifest.add_entry 'icons/image.png'
  end

  after do
    std_after
  end

  def run_builder(filename)
    super do |entry, dst_path|
      SC::Builder::Handlebars.build(entry, dst_path)
    end
  end

  it "converts Handlebars to JavaScript" do
    lines = run_builder 'templates/template.handlebars'
    lines[0].should =~ /SC\.TEMPLATES\["template"\] =/
  end

  it "handles sc_static" do
    lines = run_builder 'templates/template.handlebars'
    lines[0].should include('<img src=\\"/static/handlebars_test/en/current/icons/image.png?0\\" />')
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
sproutcore-1.11.0 spec/lib/builders/handlebars_spec.rb
sproutcore-1.11.0.rc3 spec/lib/builders/handlebars_spec.rb
sproutcore-1.11.0.rc2 spec/lib/builders/handlebars_spec.rb
sproutcore-1.11.0.rc1 spec/lib/builders/handlebars_spec.rb
sproutcore-1.10.3.1 spec/lib/builders/handlebars_spec.rb
sproutcore-1.10.2 spec/lib/builders/handlebars_spec.rb
sproutcore-1.10.1 spec/lib/builders/handlebars_spec.rb
sproutcore-1.10.0 spec/lib/builders/handlebars_spec.rb
sproutcore-1.10.0.rc.3 spec/lib/builders/handlebars_spec.rb
sproutcore-1.10.0.rc.2 spec/lib/builders/handlebars_spec.rb
sproutcore-1.10.0.rc.1 spec/lib/builders/handlebars_spec.rb
sproutcore-1.9.2 spec/lib/builders/handlebars_spec.rb
sproutcore-1.9.1 spec/lib/builders/handlebars_spec.rb
sproutcore-1.9.0 spec/lib/builders/handlebars_spec.rb
sproutcore-1.8.2.1 spec/lib/builders/handlebars_spec.rb
sproutcore-1.8.1 spec/lib/builders/handlebars_spec.rb
sproutcore-1.8.0 spec/lib/builders/handlebars_spec.rb
sproutcore-1.7.1.beta-java spec/lib/builders/handlebars_spec.rb
sproutcore-1.7.1.beta spec/lib/builders/handlebars_spec.rb
sproutcore-1.6.0.1-java spec/lib/builders/handlebars_spec.rb