aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_update_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_commands_update_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb
index 2b3bb56855..6a327068e2 100644
--- a/test/rubygems/test_gem_commands_update_command.rb
+++ b/test/rubygems/test_gem_commands_update_command.rb
@@ -485,6 +485,19 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
assert_equal expected, @cmd.options
end
+ def test_update_gem_prerelease
+ spec_fetcher do |fetcher|
+ fetcher.spec 'a', '1.a'
+ fetcher.gem 'a', '1.b'
+ end
+
+ @cmd.update_gem 'a', Gem::Requirement.new('= 1.b')
+
+ refute_empty @cmd.updated
+
+ assert @cmd.installer.instance_variable_get :@prerelease
+ end
+
def test_update_gem_unresolved_dependency
spec_fetcher do |fetcher|
fetcher.spec 'a', 1