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 #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Done #22

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
4 changes: 1 addition & 3 deletions lib/a_division_by_zero_error.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
42 / 6

42 / 0
42 / 6
4 changes: 1 addition & 3 deletions lib/a_name_error.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
"hello world"

hello_world
hello_world = "hello world"
2 changes: 0 additions & 2 deletions lib/a_syntax_error.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
x = 1

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

1 + "is the loneliest number"
1 + 1
27 changes: 27 additions & 0 deletions out.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

Not having any errors and being all green
NameError
raises a NameError when encountering undefined barewords (FAILED - 1)

Failures:

1) Not having any errors and being all green NameError raises a NameError when encountering undefined barewords
Failure/Error:
expect{
load './lib/a_name_error.rb'
}.to_not raise_error

expected no Exception, got #<NameError: undefined local variable or method `hello_world' for main:Object> with backtrace:
# ./lib/a_name_error.rb:3:in `<top (required)>'
# ./spec/no_ruby_errors_spec.rb:6:in `load'
# ./spec/no_ruby_errors_spec.rb:6:in `block (4 levels) in <top (required)>'
# ./spec/no_ruby_errors_spec.rb:5:in `block (3 levels) in <top (required)>'
# ./spec/no_ruby_errors_spec.rb:5:in `block (3 levels) in <top (required)>'

Finished in 0.03001 seconds (files took 0.16528 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/no_ruby_errors_spec.rb:4 # Not having any errors and being all green NameError raises a NameError when encountering undefined barewords