Sha256: a0886483a70604f627eeebf17ff64e9978ce7cf2c55b71b86ffc6c2172a53506

Contents?: true

Size: 956 Bytes

Versions: 20

Compression:

Stored size: 956 Bytes

Contents

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

describe SC::Project, 'load_nearest_project' do
  
  include SC::SpecHelpers
  
  it "should find the highest-level directory with a Buildfile" do
    # Note: since the fixtures live INSIDE the source directory and the 
    # source directory contains a Buildfile, the _proper_ result here is to 
    # actually return the top-level directory...
    project = SC::Project.load_nearest_project fixture_path('buildfiles', 'basic')
    project.project_root.should eql(fixture_path('..', '..'))
  end
  
  it "should stop if it finds a Buildfile with project! set" do
    project = SC::Project.load_nearest_project fixture_path('buildfiles', 'project_test', 'not_project', 'child')
    
    # The Buildfile at project_test indicates that it is a project -- so it
    # should stop searching here...
    project.project_root.should eql(fixture_path('buildfiles', 'project_test'))
  end
  
end

Version data entries

20 entries across 20 versions & 2 rubygems

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