Skip to content
Open

Done #2204

Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/a_name_error.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"hello world"

hello_world
"hello world"
10 changes: 5 additions & 5 deletions spec/no_ruby_errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@
context 'NameError' do
it 'raises a NameError when encountering undefined barewords' do
expect{
load './lib/a_name_error.rb'
'./lib/a_name_error.rb'
}.to_not raise_error
end
end

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

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

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