mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
made = nil for tests
This commit is contained in:
parent
63ac93a18d
commit
7b2b4d6031
2 changed files with 12 additions and 8 deletions
|
@ -8,6 +8,11 @@ puts "Ruby v#{RUBY_VERSION} (#{defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"}), P
|
|||
require 'bacon'
|
||||
require 'open4'
|
||||
|
||||
|
||||
# turn warnings off (esp for Pry::Hooks which will generate warnings
|
||||
# in tests)
|
||||
$VERBOSE = nil
|
||||
|
||||
# Ensure we do not execute any rc files
|
||||
Pry::RC_FILES.clear
|
||||
|
||||
|
|
|
@ -10,6 +10,13 @@ describe "Pry::DefaultCommands::Documentation" do
|
|||
str_output.string.should =~ /sample doc/
|
||||
end
|
||||
|
||||
it 'should output a method\'s documentation with line numbers' do
|
||||
redirect_pry_io(InputTester.new("show-doc sample_method -l", "exit-all"), str_output=StringIO.new) do
|
||||
pry
|
||||
end
|
||||
|
||||
str_output.string.should =~ /\d: sample doc/
|
||||
end
|
||||
|
||||
it 'should output a method\'s documentation with line numbers (base one)' do
|
||||
redirect_pry_io(InputTester.new("show-doc sample_method -b", "exit-all"), str_output=StringIO.new) do
|
||||
|
@ -19,14 +26,6 @@ describe "Pry::DefaultCommands::Documentation" do
|
|||
str_output.string.should =~ /1: sample doc/
|
||||
end
|
||||
|
||||
it 'should output a method\'s documentation with line numbers (base one)' do
|
||||
redirect_pry_io(InputTester.new("show-doc sample_method -l", "exit-all"), str_output=StringIO.new) do
|
||||
pry
|
||||
end
|
||||
|
||||
str_output.string.should =~ /\d: sample doc/
|
||||
end
|
||||
|
||||
it 'should output a method\'s documentation if inside method without needing to use method name' do
|
||||
o = Object.new
|
||||
|
||||
|
|
Loading…
Reference in a new issue