1
0
Fork 0
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:
Conrad Irwin 2011-12-13 23:09:14 -08:00
parent c1f0c78a5d
commit 560a6cbd79
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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