Sha256: 7f968873fdc84f4d9eee38b069d3959586cc172dd0300b4d7607f4bd32d244bb

Contents?: true

Size: 1017 Bytes

Versions: 27

Compression:

Stored size: 1017 Bytes

Contents

# encoding: utf-8

require 'rake'
require 'test/unit'
require 'rake/common/echotask'
require 'rake/helpers/unittest'

class TestEchoToFileTask <  Test::Unit::TestCase
private
    def file_in
        return @file_in ||= File.expand_path('../resources/echo/file.in', __FILE__)
    end

    def file_out
        return @file_out ||= File.expand_path('../tmp/file.out', __FILE__)
    end
public
    def setup
        @rake_task = Rake::Task.new('some-task-' + name, Rake.application)
    end

    def test_nil_vars
        Rake::Delphi::EchoToFile.new(@rake_task, file_in, file_out, nil)
        lines = IO.readlines(file_out)
        assert_equal "${echo_variable} must be replaced by its <value>\n", lines[0]
    end

    def test_vars
        Rake::Delphi::EchoToFile.new(@rake_task, file_in, file_out, {'echo_variable' => 'echo_variable_value'})
        lines = IO.readlines(file_out)
        assert_equal "echo_variable_value must be replaced by its <value>\n", lines[0]
    end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rake-delphi-0.0.31 test/test-echo.rb
rake-delphi-0.0.29 test/test-echo.rb
rake-delphi-0.0.30 test/test-echo.rb
rake-delphi-0.0.28 test/test-echo.rb
rake-delphi-0.0.27 test/test-echo.rb
rake-delphi-0.0.26 test/test-echo.rb
rake-delphi-0.0.25 test/test-echo.rb
rake-delphi-0.0.24 test/test-echo.rb
rake-delphi-0.0.23 test/test-echo.rb
rake-delphi-0.0.22 test/test-echo.rb
rake-delphi-0.0.21 test/test-echo.rb
rake-delphi-0.0.20 test/test-echo.rb
rake-delphi-0.0.19 test/test-echo.rb
rake-delphi-0.0.18 test/test-echo.rb
rake-delphi-0.0.17 test/test-echo.rb
rake-delphi-0.0.16 test/test-echo.rb
rake-delphi-0.0.15 test/test-echo.rb
rake-delphi-0.0.14 test/test-echo.rb
rake-delphi-0.0.13 test/test-echo.rb
rake-delphi-0.0.12 test/test-echo.rb