Sha256: 80f75f77b619565677f9b6a917afe8f396b7156f7f6519a8d65e07f4d211eea6

Contents?: true

Size: 485 Bytes

Versions: 4

Compression:

Stored size: 485 Bytes

Contents

require 'test_helper'
require 'tempfile'

module Pups
  class FileCommandTest < MiniTest::Test

    def test_simple_file_creation
      tmp = Tempfile.new("test")
      tmp.write("x")
      tmp.close


      cmd = FileCommand.new
      cmd.path = tmp.path
      cmd.contents = "hello $world"
      cmd.params = {"world" => "world"}
      cmd.run

      assert_equal("hello world",
                    File.read(tmp.path))
    ensure
      tmp.close
      tmp.unlink
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pups-1.0.3 test/file_command_test.rb
pups-1.0.2 test/file_command_test.rb
pups-1.0.1 test/file_command_test.rb
pups-1.0.0 test/file_command_test.rb