Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e8e6c60438
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (32 sloc) 1.175 kb
require 'test_helper'
class PathParamTest < Test::Unit::TestCase
include Sprout::TestHelper
context "a new PathParam" do
setup do
@path1 = File.join(fixtures, 'executable', 'paths', 'folder1')
@param = Sprout::Executable::Path.new
@param.belongs_to = FakeExecutableTask.new
@param.name = 'path'
end
should "accept a collection of paths" do
@param.value = @path1
assert_equal "-path=#{@path1}", @param.to_shell
# All child files have been added as prerequisites:
assert_equal 3, @param.belongs_to.prerequisites.size
end
should "accept a custom file expression" do
@param.file_expression = "file2"
@param.value = @path1
assert_equal "-path=#{@path1}", @param.to_shell
# All child files have been added as prerequisites:
assert_equal 1, @param.belongs_to.prerequisites.size
end
should "accept hidden_name parameter" do
@param.hidden_name = true
@param.value = @path1
assert_equal @path1, @param.to_shell
# All child files have been added as prerequisites:
assert_equal 3, @param.belongs_to.prerequisites.size
end
end
end
Jump to Line
Something went wrong with that request. Please try again.