Sha256: 3fec58772c9c96c932bccf8303e408de61b819250938e4633f3fdb33f7dc14c9
Contents?: true
Size: 1.12 KB
Versions: 5
Compression:
Stored size: 1.12 KB
Contents
require 'helper' class TestLicenseeBin < Minitest::Test should 'work via commandline' do root = File.expand_path '..', File.dirname(__FILE__) stdout, stderr, status = Dir.chdir root do args = [windows? && 'ruby', 'bin/licensee'].compact Open3.capture3(*args) end msg = "expected #{stdout} to include `License: MIT`" assert stdout.include?('License: MIT'), msg msg = "expected #{stdout} to include `Matched file: LICENSE.md`" assert stdout.include?('License file: LICENSE.md'), msg assert_equal 0, status assert stderr.empty? end should 'work via commandline with file argument' do root = File.expand_path '..', File.dirname(__FILE__) stdout, stderr, status = Dir.chdir root do args = [windows? && 'ruby', 'bin/licensee', 'LICENSE.md'].compact Open3.capture3(*args) end msg = "expected #{stdout} to include `License: MIT`" assert stdout.include?('License: MIT'), msg msg = "expected #{stdout} to include `Matched file: LICENSE.md`" assert stdout.include?('License file: LICENSE.md'), msg assert_equal 0, status assert stderr.empty? end end
Version data entries
5 entries across 5 versions & 1 rubygems