Skip to content
Open

Done #1944

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions spec/no_ruby_errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@
it 'raises a NameError when encountering undefined barewords' do
expect{
load './lib/a_name_error.rb'
}.to_not raise_error
}.to raise_error(NameError)
end
end

context 'SyntaxError' do
it 'raises a SyntaxError for nonsensical code' do
expect{
load './lib/a_syntax_error.rb'
}.to_not raise_error
}.to raise_error(SyntaxError)
end
end

context 'TypeError' do
it 'raises a TypeError for objects of the wrong type' do
expect{
load './lib/a_type_error.rb'
}.to_not raise_error
}.to raise_error(TypeError)
end
end

context 'ZeroDivisionError' do
it 'raises a ZeroDivisionError for dividing by zero' do
expect{
load './lib/a_division_by_zero_error.rb'
}.to_not raise_error
}.to raise_error(ZeroDivisionError)
end
end
end