Sha256: b7714ce68b061c40ea220ecf0f186dfac8bfea5e89c782324760a7119fbbd0ec

Contents?: true

Size: 1.32 KB

Versions: 20

Compression:

Stored size: 1.32 KB

Contents

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

describe SC::Project, 'buildfile' do

  include SC::SpecHelpers

  it "should return a new, empty buildfile if no Buildfile can be found in the project" do
    project = SC::Project.new fixture_path('buildfiles', 'empty_project')
    puts project.buildfile.loaded_paths
    project.buildfile.loaded_paths.size.should eql(0)
    project.buildfile.tasks.size.should eql(0)
  end
  
  it "should load a buildfile if one is found in project_root" do
    project = SC::Project.new fixture_path('buildfiles', 'installed')
    project.buildfile.loaded_paths.size.should eql(1)
    project.buildfile.tasks.size.should eql(2)
  end
  
  it "should load all files matching SC.env.buildfile_names" do
    SC.env.buildfile_names = ['Buildfile', 'Buildfile2']
    project = SC::Project.new fixture_path('buildfiles', 'installed')
    project.buildfile.loaded_paths.size.should eql(2)
    SC.env.delete :buildfile_names
  end

  it "should merge over top of a parent project buildfile if there is one" do
    installed = SC::Project.new fixture_path('buildfiles', 'installed')
    basic = SC::Project.new fixture_path('buildfiles', 'basic'), :parent => installed
    basic.buildfile.lookup(:installed_task).should_not be_nil
    basic.buildfile.lookup(:test_task1).should_not be_nil
  end
  
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090407205609 spec/lib/models/project/buildfile_spec.rb
sproutit-sproutcore-1.0.0.20090408130025 spec/lib/models/project/buildfile_spec.rb
sproutit-sproutcore-1.0.0.20090416161445 spec/lib/models/project/buildfile_spec.rb
sproutit-sproutcore-1.0.20090721145236 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1046 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1043 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1042 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1037 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1035 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1031 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1030 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1029 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1027 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1028 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1026 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1025 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1024 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1009 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1008 spec/lib/models/project/buildfile_spec.rb
sproutcore-1.0.1003 spec/lib/models/project/buildfile_spec.rb