Permalink
Browse files

gist: re-add 'jist' gem dependency with :requires_gem

Oops, forgetting this meant that 'gist' command would error out with
ugly messages rather than prompting the user to 'install-command'
  • Loading branch information...
1 parent 24437c7 commit c10017f17d989fbb2bce9d5a2de3de86acdcdb05 @banister banister committed Jan 17, 2013
Showing with 7 additions and 2 deletions.
  1. +1 −0 lib/pry/commands/gist.rb
  2. +6 −2 spec/commands/gist_spec.rb
View
1 lib/pry/commands/gist.rb
@@ -3,6 +3,7 @@ class Command::Gist < Pry::ClassCommand
match 'gist'
group 'Misc'
description 'Playback a string variable or a method or a file as input.'
+ command_options :requires_gem => "jist"
banner <<-'BANNER'
Usage: gist [OPTIONS] [--help]
View
8 spec/commands/gist_spec.rb
@@ -2,10 +2,14 @@
# THey need to be updated for the new 'gist' API, but im too sleepy to
# do that now.
+require 'helper'
-# require 'helper'
+describe 'gist' do
+ it 'has a dependency on the jist gem' do
+ Pry::Command::Gist.command_options[:requires_gem].should == "jist"
+ end
+end
-# describe 'gist' do
# before do
# Pad.jist_calls = {}
# end

0 comments on commit c10017f

Please sign in to comment.