mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Ensure show-method -h works in ruby-1.9.2 [fixes #374]
This commit is contained in:
parent
c1f0c78a5d
commit
560a6cbd79
2 changed files with 5 additions and 1 deletions
|
@ -22,7 +22,7 @@ class Pry
|
|||
yield opt
|
||||
|
||||
opt.on :h, :help, "This message" do
|
||||
output.puts opt
|
||||
output.puts opt.to_s
|
||||
throw :command_done
|
||||
end
|
||||
end
|
||||
|
|
|
@ -254,6 +254,10 @@ describe "Pry::DefaultCommands::Introspection" do
|
|||
str_output.string.should =~ /def sample/
|
||||
end
|
||||
|
||||
it 'should output help' do
|
||||
mock_pry('show-method -h').should =~ /Usage: show-method/
|
||||
end
|
||||
|
||||
it 'should output a method\'s source with line numbers' do
|
||||
str_output = StringIO.new
|
||||
redirect_pry_io(InputTester.new("show-method -l sample_method", "exit-all"), str_output) do
|
||||
|
|
Loading…
Reference in a new issue