Sha256: 331fb14c1a790aad7e3a3002df0f5bce978c5a94975ef7e7438175a7976c408b

Contents?: true

Size: 1.54 KB

Versions: 23

Compression:

Stored size: 1.54 KB

Contents

require File.join(File.dirname(__FILE__), %w(.. spec_helper))

# Creates combined entries for javascript & css
describe "manifest:prepare_build_tasks:Strings" do
  
  include SC::SpecHelpers
  include SC::ManifestSpecHelpers
  
  before do
    std_before
  end
  
  def run_task
    @manifest.prepare!
    super('manifest:prepare_build_tasks:strings')
  end

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

  it "should add strings entry if strings.js is found" do
    run_task
    @manifest.entry_for('source/lproj/strings.js').should_not be_nil # precondition
    @manifest.entry_for('strings.yaml', :hidden => true).should_not be_nil
  end

  describe "transform entry" do
    
    before do
      run_task
      @entry = @manifest.entry_for('strings.yaml', :hidden => true)
    end
    
    it "should hide entry" do
      @entry.should be_hidden
    end
    
    it "has entry_type = :strings" do
      @entry.entry_type.should == :strings
    end

    it "should not hide source entry" do
      @entry.source_entry.should_not be_hidden
    end
    
    it "has source/lproj/strings.js as source entry" do
      @entry.source_entry.filename.should == 'source/lproj/strings.js'
    end
    
    it "has ext of 'yaml'" do
      @entry.ext.should == 'yaml'
      @entry.filename.should =~ /\.yaml$/
    end
    
    it "has build task of build:strings" do
      @entry.build_task.to_s.should == 'build:strings'
    end
  
  end
end


Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090407205609 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutit-sproutcore-1.0.0.20090408130025 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutit-sproutcore-1.0.0.20090416161445 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutit-sproutcore-1.0.0.20090720093355 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutit-sproutcore-1.0.0.20090720202429 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutit-sproutcore-1.0.0.20090721125122 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutit-sproutcore-1.0.20090721145236 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1046 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1043 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1042 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1037 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1035 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1031 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1030 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1029 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1027 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1028 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1026 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1025 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb
sproutcore-1.0.1024 spec/buildtasks/manifest/prepare_build_tasks/strings_spec.rb