File: project_spec.rb

package info (click to toggle)
jruby 1.5.1-1%2Bdeb6u1
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze-lts
  • size: 47,024 kB
  • ctags: 74,144
  • sloc: ruby: 398,155; java: 169,506; yacc: 3,782; xml: 2,469; ansic: 415; sh: 279; makefile: 78; tcl: 40
file content (25 lines) | stat: -rw-r--r-- 816 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require File.expand_path('../../ant_spec_helper', __FILE__)

describe Ant, "project", :type => :ant do
  before :each do
    @ant = example_ant :name => "spec project", :description => "spec description"
  end

  it "should have the 'basedir' set" do
    # expand_path is used to avoid / and \\ mismatch on Windows
    File.expand_path(@ant.project.base_dir.path).should == Dir::tmpdir
  end

  it "should have a project helper created" do
    @ant.project.get_reference(Ant::ProjectHelper::PROJECTHELPER_REFERENCE).should be_kind_of(Ant::ProjectHelper)
  end

  it "should have a logger set" do
    @ant.project.build_listeners.should_not be_empty
  end

  it "should have a name and description" do
    @ant.project.name.should == "spec project"
    @ant.project.description.should == "spec description"
  end
end