rubygems_generators/executable/templates/test/test_cli.rb.erb in newgem-1.0.7 vs rubygems_generators/executable/templates/test/test_cli.rb.erb in newgem-1.1.0
- old
+ new
@@ -1,8 +1,15 @@
require File.join(File.dirname(__FILE__), "test_helper.rb")
require '<%= bin_name %>/cli'
class Test<%= module_name %>Cli < Test::Unit::TestCase
- def test_execute
- <%= module_name %>::CLI.execute
+ def setup
+ @stdout_io = StringIO.new
+ <%= module_name %>::CLI.execute(@stdout_io, [])
+ @stdout_io.rewind
+ @stdout = @stdout_io.read
+ end
+
+ def test_not_print_default_output
+ assert_no_match(/To update this executable/, @stdout)
end
end
\ No newline at end of file