Sha256: 52bb9b509f5ea4f12df4fb1fe09e9f2efb714c38a114f41cc31059f25a7211d8
Contents?: true
Size: 818 Bytes
Versions: 1
Compression:
Stored size: 818 Bytes
Contents
# frozen_string_literal: true require 'English' require 'minitest/autorun' require 'storazzo' class BinaryStorazzoTest < Minitest::Test def test_binary_returns_error_with_random_argv ret = `bin/storazzo aaa` # puts ret # puts "return code is '#{$?.exitstatus}'" should_match_string = 'Unknown action1: aaa. Available actions:' # 'ERROR: Unknown action1: aaa. Available actions: ["auto", "help", "show"]' assert_equal( $CHILD_STATUS.exitstatus, 13, 'Wrong argument should return 13' ) matches_expected_error = ret.match(should_match_string) # puts "matches_expected_error: ''#{matches_expected_error}''" assert( !matches_expected_error.nil?, "Binary should return a string which should contain this string: '#{should_match_string}'" ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
storazzo-0.6.1 | test/bin/storazzo.rb |