Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Done #2191

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Done #2191

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
Empty file modified .learn
100644 → 100755
Empty file.
Empty file modified .rspec
100644 → 100755
Empty file.
Empty file modified CONTRIBUTING.md
100644 → 100755
Empty file.
Empty file modified LICENSE.md
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion lib/a_division_by_zero_error.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
42 / 6

42 / 0
42 / 7
2 changes: 1 addition & 1 deletion lib/a_name_error.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"hello world"

hello_world
"hello world"
2 changes: 1 addition & 1 deletion lib/a_syntax_error.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
x = 1

x =
x = 3
2 changes: 1 addition & 1 deletion lib/a_type_error.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1 + 1

1 + "is the loneliest number"
1 + 1
10 changes: 5 additions & 5 deletions spec/no_ruby_errors_spec.rb → spec/ruby_errors_spec.rb
100644 → 100755
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_not 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_not 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_not 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_not raise_error(ZeroDivisionError)
end
end
end
end
Empty file modified spec/spec_helper.rb
100644 → 100755
Empty file.