aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_setup_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-08 22:41:03 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-08 22:41:03 +0000
commit7083cebeaea83096128fc5ccb5f60bfbe5bcc939 (patch)
treefb25c12a6cc01a1a8de5221d64da632418e194a3 /test/rubygems/test_gem_commands_setup_command.rb
parentfa343a796fd256fc9098db7fdddf226fe5cbd181 (diff)
downloadruby-7083cebeaea83096128fc5ccb5f60bfbe5bcc939.tar.gz
* lib/rubygems: Update to RubyGems 2.0.4. See
https://github.com/rubygems/rubygems/blob/2.0/History.txt for changes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_setup_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb52
1 files changed, 52 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 16298c9393..9c5ee7a5a8 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -1,3 +1,5 @@
+# coding: UTF-8
+
require 'rubygems/test_case'
require 'rubygems/commands/setup_command'
@@ -73,5 +75,55 @@ class TestGemCommandsSetupCommand < Gem::TestCase
assert_path_exists os_defaults_rb
end
+ def test_show_release_notes
+ @default_external = nil
+ capture_io do
+ @default_external, Encoding.default_external =
+ Encoding.default_external, Encoding::US_ASCII
+ end if Object.const_defined? :Encoding
+
+ @cmd.options[:previous_version] = Gem::Version.new '2.0.2'
+
+ open 'History.txt', 'w' do |io|
+ io.puts <<-History_txt
+# coding: UTF-8
+
+=== #{Gem::VERSION} / 2013-03-26
+
+* Bug fixes:
+ * Fixed release note display for LANG=C when installing rubygems
+ * π is tasty
+
+=== 2.0.2 / 2013-03-06
+
+* Bug fixes:
+ * Other bugs fixed
+
+=== 2.0.1 / 2013-03-05
+
+* Bug fixes:
+ * Yet more bugs fixed
+ History_txt
+ end
+
+ use_ui @ui do
+ @cmd.show_release_notes
+ end
+
+ expected = <<-EXPECTED
+=== 2.0.2 / 2013-03-06
+
+* Bug fixes:
+ * Other bugs fixed
+
+ EXPECTED
+
+ assert_equal expected, @ui.output
+ ensure
+ capture_io do
+ Encoding.default_external = @default_external
+ end if @default_external
+ end
+
end