test/test_licensee_bin.rb in licensee-8.0.0 vs test/test_licensee_bin.rb in licensee-8.1.0
- old
+ new
@@ -13,6 +13,21 @@
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__)
+ Dir.chdir root
+ stdout, stderr, status = Open3.capture3("#{root}/bin/licensee LICENSE.md")
+
+ 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