-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1874 from JuanitoFatas/update-terminology
Use clearer terminologies
- Loading branch information
Showing
8 changed files
with
40 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require_relative 'helper' | ||
|
||
describe "Pry.config.unrescued_exceptions" do | ||
before do | ||
@str_output = StringIO.new | ||
end | ||
|
||
it 'should rescue all exceptions NOT specified on unrescued_exceptions' do | ||
expect(Pry.config.unrescued_exceptions.include?(NameError)).to eq false | ||
expect { Pry.start(self, input: StringIO.new("raise NameError\nexit"), output: @str_output) }.not_to raise_error | ||
end | ||
|
||
it 'should NOT rescue exceptions specified on unrescued_exceptions' do | ||
old_allowlist = Pry.config.unrescued_exceptions | ||
Pry.config.unrescued_exceptions = [NameError] | ||
expect { Pry.start(self, input: StringIO.new("raise NameError"), output: @str_output) }.to raise_error NameError | ||
Pry.config.unrescued_exceptions = old_allowlist | ||
end | ||
end |