Sha256: 9b49c80d029cb5f75231218b103eef3658e8bf5f5d4eabf53c3862120da22e12

Contents?: true

Size: 914 Bytes

Versions: 4

Compression:

Stored size: 914 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require 'fileutils'

require 'shenandoah/buildr/locator'

describe Shenandoah::Buildr::Locator do
  include Shenandoah::Spec::Tmpfile

  before do
    @project = define('sample', :base_dir => tmpdir)
    @loc = Shenandoah::Buildr::Locator.new(@project)
  end

  it "resolves the specs from the base dir" do
    @loc.spec_path.should == "#{tmpdir}/src/spec/javascript"
  end
  
  it "resolves the main source from src main" do
    @loc.main_path.should == "#{tmpdir}/src/main/javascript"
  end
  
  it "uses a path under target for tmp" do
    @loc.tmp_path.should == "#{tmpdir}/target/shenandoah"
  end
  
  it "allows main to be overriden with test.using" do |variable|
    p = define('another', :base_dir => tmpdir) do
      test.using :main_path => "/foo"
    end
    
    Shenandoah::Buildr::Locator.new(p).main_path.should == "/foo"
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
rsutphin-shenandoah-0.1.1 spec/shenandoah/buildr/locator_spec.rb
rsutphin-shenandoah-0.1.2 spec/shenandoah/buildr/locator_spec.rb
shenandoah-0.1.1 spec/shenandoah/buildr/locator_spec.rb
shenandoah-0.1.2 spec/shenandoah/buildr/locator_spec.rb