mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Changed Mon_Ouie's test to use :exception_handler hash param instead
of the accessor. Modified `ls -av` to `ls -avf` so as to prevent pageer from activating and failing test.
This commit is contained in:
parent
080d19e2fe
commit
21a6cc66d4
1 changed files with 7 additions and 9 deletions
16
test/test.rb
16
test/test.rb
|
@ -88,11 +88,10 @@ describe Pry do
|
|||
o = Exception.new
|
||||
str_output = StringIO.new
|
||||
|
||||
pry_tester = Pry.new(:input => InputTester.new("self"),
|
||||
:output => str_output)
|
||||
|
||||
was_called = false
|
||||
pry_tester.exception_handler = proc { was_called = true }
|
||||
pry_tester = Pry.new(:input => InputTester.new("self"),
|
||||
:output => str_output,
|
||||
:exception_handler => proc { was_called = true })
|
||||
|
||||
pry_tester.rep(o)
|
||||
was_called.should == false
|
||||
|
@ -102,11 +101,10 @@ describe Pry do
|
|||
o = Exception.new
|
||||
str_output = StringIO.new
|
||||
|
||||
pry_tester = Pry.new(:input => InputTester.new("raise self"),
|
||||
:output => str_output)
|
||||
|
||||
was_called = false
|
||||
pry_tester.exception_handler = proc { was_called = true }
|
||||
pry_tester = Pry.new(:input => InputTester.new("raise self"),
|
||||
:output => str_output,
|
||||
:exception_handler => proc { was_called = true })
|
||||
|
||||
pry_tester.rep(o)
|
||||
was_called.should == true
|
||||
|
@ -405,7 +403,7 @@ describe Pry do
|
|||
it "should execute command and show output with :show_output => true flag" do
|
||||
str = StringIO.new
|
||||
Pry.output = str
|
||||
result = Pry.run_command "ls -av", :context => RCTest, :show_output => true
|
||||
result = Pry.run_command "ls -afv", :context => RCTest, :show_output => true
|
||||
str.string.should =~ /global variables/
|
||||
Pry.output = $stdout
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue