aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/rubygems_plugin.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/rubygems_plugin.rb')
-rw-r--r--test/rubygems/rubygems_plugin.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/rubygems/rubygems_plugin.rb b/test/rubygems/rubygems_plugin.rb
new file mode 100644
index 0000000000..269c3f10db
--- /dev/null
+++ b/test/rubygems/rubygems_plugin.rb
@@ -0,0 +1,16 @@
+require 'rubygems/command_manager'
+
+class Gem::Commands::InterruptCommand < Gem::Command
+
+ def initialize
+ super('interrupt', 'Raises an Interrupt Exception', {})
+ end
+
+ def execute
+ raise Interrupt, "Interrupt exception"
+ end
+
+end
+
+Gem::CommandManager.instance.register_command :interrupt
+