Sha256: 4ecd409788a6ca8bed8f04bff9aa33f7d6f9de38abc158ab56630bbd10332130

Contents?: true

Size: 912 Bytes

Versions: 3

Compression:

Stored size: 912 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

3 entries across 3 versions & 2 rubygems

Version Path
rsutphin-shenandoah-0.1.0 spec/shenandoah/buildr/locator_spec.rb
shenandoah-0.1.0 spec/shenandoah/buildr/locator_spec.rb
shenandoah-0.0.0 spec/shenandoah/buildr/locator_spec.rb