Sha256: 841d1bcff784538f8cec2f9c0e4e5d2ddca100a4f0980851675b9b13bdd8caaf

Contents?: true

Size: 456 Bytes

Versions: 1

Compression:

Stored size: 456 Bytes

Contents

require 'minitest/assertions'

module Minitest::Assertions
    #
    #  Fails unless +expected and +actual have the same items.
    #
    def assert_executes(cmd)
        assert execute_cmd(cmd),
          "Expected #{cmd} exited with status #{$?.exitstatus}"
    end

    def last_cmd_execution_output
        @cmd_last_output
    end

    private

    def execute_cmd(cmd)
        @cmd_last_output = `#{cmd} 2>&1`
        $?.exitstatus == 0
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lanes-0.1.2 spec/helpers/minitest_assertions.rb