Sha256: fd2438e05f72b4f60263a54e43453b6ae0e0840d1e28c1c9b8b18c9511aecbc7

Contents?: true

Size: 958 Bytes

Versions: 44

Compression:

Stored size: 958 Bytes

Contents

require "buildtasks/manifest/spec_helper"

describe "manifest:prepare_build_tasks:handlebars" do

  include SC::SpecHelpers
  include SC::ManifestSpecHelpers

  before do
    std_before
  end

  def run_task
    @manifest.prepare!
    super('manifest:prepare_build_tasks:handlebars')
  end

  it "should run manifest:prepare_build_tasks:setup as a prereq" do
    should_run("manifest:prepare_build_tasks:setup") { run_task }
  end

  it "creates a transform entry for each handlebars entry" do
    run_task

    originals = @manifest.entries(:hidden => true).select do |entry|
      entry.original? && entry.ext == 'handlebars'
    end

    originals.size.should > 0

    entries = @manifest.entries.select { |e| e.entry_type == :javascript }
    entries.size.should == originals.size

    entries.each do |entry|
      entry.should be_transform
      entry.source_entry.should_not be_nil
      originals.should include(entry.source_entry)
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
sproutcore-1.6.0.1 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.1-x86-mingw32 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0-java spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.rc.2-x86-mingw32 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.rc.2 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.rc.2-java spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.rc.1-x86-mingw32 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.rc.1 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.rc.1-java spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.beta.3-x86-mingw32 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.beta.3-java spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.beta.3 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.beta.2-x86-mingw32 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.beta.2-java spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.beta.2 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.6.0.beta.1 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.5.0-java spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.5.0 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb
sproutcore-1.5.0.rc.2 spec/buildtasks/manifest/prepare_build_tasks/handlebars_spec.rb